I created a .Xmodmap file to remap my Caps_Lock to Mode_switch.
This allows me to reassign my Arrow/Navigation Block of the keyboard to the home row.
Everything worked fine, until I realized, that programs written on the java platform and use Swing (like Jetbrains' editors) don't recognize these remaps.
Now I want to port these settings to xkb, as it is deprecated to use xmodmap.
(I think this could be the solution for this problem, but I really don't know how to make the same with xkb.) The xkb configuration is confusing to me, and seems like a really complicated approach for just this few remaps.
So, how can I do this?
I would really, prefer another approach/workaround for the java problem, so I could keep my xmodmap configuration.
Here is my .Xmodmap file:
! Disable Caps Lock and use it as mode switch
keycode 66 = Mode_switch Mode_switch
! Toggle Caps Lock with <Mode_switch> + <Control_R>
keysym Control_R = Control_R Control_R Caps_Lock
! Remap navigation block to ijkl...
keysym j = j J Left Left
keysym l = l L Right Right
keysym i = i I Up Up
keysym k = k K Down Down
keysym u = u U Home Home
keysym o = o O End End
! ö Ö
keycode 47 = odiaeresis Odiaeresis BackSpace BackSpace
keysym h = h H Delete Delete
keysym n = n N Prior Prior
! enable mu for use with Iso_Level_3 (the right alt key on german keyboards)
keysym m = m M Next Next mu mu
! Space to Escape
keysym space = space space Escape
And here is my xmodmap output:
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Mode_switch (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)