diff options
author | Haoran S. Diao (刁浩然) <0@hairydiode.xyz> | 2025-08-18 23:55:21 -0700 |
---|---|---|
committer | Haoran S. Diao (刁浩然) <0@hairydiode.xyz> | 2025-08-18 23:55:21 -0700 |
commit | 87966cfb6e8a2d592d76ed7add901fa349aff2a4 (patch) | |
tree | c015576d6d3c915d6cd4fcaf13f06bb62fcf7703 /README | |
parent | af1eebc9cccdd491b3aeb29d3a08e892085a17e3 (diff) |
startup script
Diffstat (limited to 'README')
-rw-r--r-- | README | 42 |
1 files changed, 32 insertions, 10 deletions
@@ -2,9 +2,14 @@ Hack to implement Boshiamy Input Method using only userspace X11 config files ------------------------------------=[Setup]=----------------------------------- -Move XCompose to ~/.XCompose -Move boshiamy to /usr/share/X11/xkb/symbols/ -run startup, or append it to your wm's X11 startup script. +Move "XCompose" to ~/.XCompose (Or append if you already have custome XCompose +rules) + +Move "boshiamy" to /usr/share/X11/xkb/symbols/ + +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 +further reading) --------------------------------=[How it Works]=-------------------------------- X11 handles key inputs via the xkb extension, which in addition to defining @@ -55,11 +60,14 @@ key in Boshiamy. (These key symbols can be arbitrary as long as they don't exist in any other key layout) For example the "Q" key on US Keyboards is mapped to key symbol "U9AD8" (高). -The XCompose file defines a compose rule where the key sequence <U9AD8> <space> -outputs the string "高". +The XCompose file defines compose rules that map the sequences of the above +mentioned key symbols plus space or a number key to various characters. For +example: + <U516B> <U5357> <U516B> <U516B> <space> : "肏" +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 are both loaded and toggled with the alt key. +layout you use) and boshiamy layout are both 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 @@ -81,7 +89,21 @@ Is This Slow? Does this work with xyz program? This should work with virtually any X11 program that properly implements - text input and which you can type. This doesn't work on the Linux - console, which uses its own keymap configs. Unfortunately kmscon, even - though it uses xkb, gets string information one key at a time and - therefore does not implement compose functionality properly. + text input. This doesn't work on the Linux console, which uses its own + keymap configs. Unfortunately kmscon, even though it uses xkb, gets + string information one key at a time and therefore does not implement + compose functionality properly. + +-------------------------------=[Further Reading]=------------------------------ +man xkeyboard-config(7) + for more setxkbmap options +man xcompose(3) + for how .XCompose works +https://www.x.org/archive/X11R7.5/doc/input/XKB-Config.html + for xkb layout config +https://www.x.org/archive/X11R7.5/doc/input/XKB-Enhancing.html + for a description of the xkb layout system +https://festina-lente-productions.com/articles/the-compose-key/ + for how the Compose system is supposed to be used +https://wiki.archlinux.org/title/X_keyboard_extension + for comprehensive information on how xkb works and how to configure it |