keyboard layout switching with ibus
1
vote
0
answers
789
views
I've had to leave
xim
behind because of various graphical issues.
And I'm trying to set up ibus
but having trouble getting it to cycle through keyboards.
Other info:
- Debian Testing
- Awesome WM
---
This was my set up with before using ibus
. I mapped one of my special keys on my keyboard to ISO_Next_Group
. With the set up below I could cycle through the three keyboad layouts using my special key and compose using PrtSc
.
### ~/.sessionrc
setxkbmap -layout 'us,gr,il' -variant ',polytonic,biblical' -option ctrl:nocaps,compose:prsc
xmodmap ~/.Xmodmap
export GTK_IM_MODULE=xim
### ~/.Xmodmap
keycode 147 = ISO_Next_Group NoSymbol
xev
gives this when I press my key (both events occur on keydown and nothing on keyup):
KeyPress event, serial 36, synthetic NO, window 0x3200001,
root 0x79b, subw 0x0, time 9147156, (-108,258), root:(763,709),
state 0x0, keycode 147 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x3200001,
root 0x79b, subw 0x0, time 9147156, (-108,258), root:(763,709),
state 0x0, keycode 147 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
---
With ibus
, my ~/.Xmodmap
is the same and ~/.xsessionrc
now contains:
setxkbmap -layout 'us,gr,il' -variant ',polytonic,biblical' -option ctrl:nocaps,compose:prsc
xmodmap ~/.Xmodmap
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
ibus-daemon -rx &
In ibus-setup
, all three keyboard layouts are listed and the key to change layouts is ISO_Next_group
, but when I press this key, rather than cycling through all three layouts, ibus
just toggles between us
and the most recently selected (by mouse) other layout.
Once ibus-daemon
is loaded, I notice that the output from xev
also changes when I press my ISO_Next_Group
key:
FocusOut event, serial 33, synthetic NO, window 0x4e00001,
mode NotifyGrab, detail NotifyAncestor
FocusOut event, serial 33, synthetic NO, window 0x4e00001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 33, synthetic NO, window 0x4e00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
---
**How do I get ibus
to cycle through all three keyboard layouts?**
---
### Update
I switched around the hotkeys:
- + ISO_Next_Group
→ switch layout
- ISO_Next_Group
→ Enter emoji
This mostly seems to work.
I had to add GLFW_IM_MODULE=ibus
for kitty
support.
Asked by David Purton
(321 rep)
Feb 5, 2023, 07:23 AM
Last activity: Feb 6, 2023, 04:56 AM
Last activity: Feb 6, 2023, 04:56 AM