Add a Linux version (IBus) for Bazzite / SteamOS desktop mode
linux/autozhuyin_ibus.py is an IBus engine on top of the shared Python core: preedit with the cursor and blue English segments, lookup table, Shift tap for English mode, candidate clicks. install.sh puts everything in the home folder (works on read-only systems) and an autostart entry registers the engine with ibus-daemon and selects it. Tested with a stand-in IBus module. Also fixes Windows: wants() did not claim the backtick, so backtick + punctuation never reached the engine under PIME. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -339,6 +339,8 @@ class CompositionEngine:
|
||||
return False # English mode: everything goes to the app as typed
|
||||
if key in SPECIAL_KEYS:
|
||||
return bool(self.keys)
|
||||
if key == BACKTICK:
|
||||
return True
|
||||
if self.keys:
|
||||
return True
|
||||
if key == " ":
|
||||
|
||||
@@ -105,6 +105,10 @@ class WrapperTests(unittest.TestCase):
|
||||
def test_mixed_sentence(self):
|
||||
self.assertEqual(type_text(self.svc, "ji3 hello world su3cl3 "), "我hello world 你好")
|
||||
|
||||
def test_backtick_symbol(self):
|
||||
self.assertEqual(type_text(self.svc, "`<"), ",")
|
||||
self.assertEqual(type_text(self.svc, "ji3`."), "我。")
|
||||
|
||||
def test_composition_shown(self):
|
||||
type_text(self.svc, "su3c")
|
||||
self.assertEqual(self.svc.reply["compositionString"], "你ㄏ")
|
||||
|
||||
Reference in New Issue
Block a user