Switching keyboard layouts

So, here’s my problem: I have a Japanese 109-key keyboard, but I can’t find a way to switch my keyboard layout from US to Japanese. I have tried using the settings in both ibus and xfce4, but neither do anything, and they both stick with the US layout. I also need this to work so that when I have a US keyboard, I can switch back and forth between the US layout and the Japanese layout.

Maybe look at the setxkbmap -model [name of geometry] command, adding it to xprofile to keep it persistant. See https://www.x.org/releases/X11R7.7/doc/xorg-docs/input/XKB-Config.html, https://wiki.archlinux.org/title/Xorg/Keyboard_configuration. I don’t know if you automatically have the right the right model/geometry available already, or how to add it if you don’t.
Your DE might also have a built-in setting; I can see one for Plasma under Input Devices in the System Settings app, but I don’t know about other DEs. There also might be some differences if you’re using Wayland; I know Wayland gets the keyboard layouts from the same directory (/usr/share/X11/xkb), and I’m reasonably confident that setxkbmap still works, but I’m not sure it uses xprofile.

I think your solution looks promising, but I unfortunately don’t know what my keyboard geometry is called. All I know is that it’s the 109-key variant of the Japanese qwerty keyboard. (I even tried Apple Aluminum once since apparently it was also called JIS, and it wasn’t correct either.)

Apparently you should be able to use the generic 105-key layout with the right layout and variant (source: https://wiki.debian.org/Keyboard#Japanese_109_keyboard). Try setxkbmap -model pc105 -layout jp -variant OADG109A, or without the variant option (the link mentions the difference, but I don’t know which you’d prefer).

Thanks! It worked after restarting IBus.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.