summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran S. Diao (刁浩然) <0@hairydiode.xyz>2025-08-19 13:06:42 -0700
committerHaoran S. Diao (刁浩然) <0@hairydiode.xyz>2025-08-19 13:06:42 -0700
commit28a63e049417360098e1f4142220d49adcfcf632 (patch)
tree0b0c6a167089b2bd3b764debe3135291d3f880ac
parent8fa495ff3a4d9595f7496fb0c611726bf4680248 (diff)
Improved write-upmain
-rw-r--r--README31
1 files changed, 19 insertions, 12 deletions
diff --git a/README b/README
index 5fb5e5e..c686e0d 100644
--- a/README
+++ b/README
@@ -1,11 +1,12 @@
[xkb-boshiamy]
-Hack to implement Boshiamy Input Method using only userspace X11 config files
+Hack to implement Boshiamy Input Method using only X11 config files
------------------------------------=[Setup]=-----------------------------------
Move "XCompose" to ~/.XCompose (Or append if you already have custome XCompose
rules)
Move "boshiamy" to /usr/share/X11/xkb/symbols/
+ note: you might have to do this again whenever you update xkb
Append "startup" to your wm's X11 startup script. Alternatively you can simply
set boshiamy as one of your keyboard layouts somewhere in your X11 Configs (see
@@ -16,11 +17,11 @@ NOTE: If you're using a real input method like Ibus or fcitx You need to click
--------------------------------=[How it Works]=--------------------------------
X11 handles key inputs via the xkb extension, which in addition to defining
-keymaps/layouts, also handles compose/dead keys on the
-application side via libxkbcommon. I have hijacked this functionality to
-implement a fully functional version of the Boshiamy input method that requires
-no software other than X11, and which should be in theory compatible with any
-X11 application unlike ibus or fcitx.
+keymaps/layouts, also handles compose/dead keys on the application side (on
+Wayland via libxkbcommon). I have hijacked this functionality to implement a
+fully functional version of the Boshiamy input method that requires no software
+other than X11, and which should be in theory compatible with any X11
+application unlike ibus or fcitx.
Background]=---
What is a compose/dead key?
@@ -50,7 +51,7 @@ How exactly is this functionality being handled by X11?
turned into key symbols are defined in /usr/lib/X11/xkb/.
Compose happens at one layer of abstraction above "key symbols". Most
- applications after receiving an X11 key event, use libxkbcommon to
+ applications after receiving an X11 key event, use libxkbcommon/xlib to
translate this into a string, during which the Compose table is
referenced to get the desired result of the compose sequences.
@@ -70,21 +71,21 @@ example:
maps b+b+n+b+space to "肏"
Startup runs setxkbmap so that both the us (you can change this to whatever
-layout you use) and boshiamy layout are both loaded and toggled with the alt key.
+layout you use) and boshiamy layout are loaded and toggled with the alt key.
One issue with this implementation is that Compose rules are independent of the
keyboard layout (which is why the en_US.UTF-8 Compose file is so large, it has
to handle essentially every keyboard layout), which means the only way to switch
between boshiamy and regular ascii input is to define a new keyboard layout that
-only types its own key symbols, otherwise only XCompose would be needed.
+only types its own key symbols, otherwise only the XCompose file would be needed.
----------------------------------=[Questions]=---------------------------------
-Will this work with other input methods?
+Will this method work with other input methods?
With the custom key symbols I think CangJie is honestly a better
candidate. Any component based input method will work since they are
more or less open loop. Inferior phonetic input methods like Pinyin and
- Zhuyin which requires the user to pick out the character and which
- relies on predictive text can not be implemented in this way.
+ Zhuyin which requires the user to pick out the character and rely on
+ predictive text can not be implemented in this way.
Is This Slow?
It takes 2-3 seconds to load the compose file on X11 startup. Honestly
@@ -97,6 +98,12 @@ Does this work with xyz program?
string information one key at a time and therefore does not implement
compose functionality properly.
+Is it possible to make this 100% user specific?
+ It seems that although modern Wayland based systems have a way of
+ handling user specific keyboard layouts, every option I've tried on my
+ system to make the keyboard layout user specific like the XCompose file
+ has not worked.
+
-------------------------------=[Further Reading]=------------------------------
man xkeyboard-config(7)
for more setxkbmap options