You are not logged in.
Pages: 1
Hi,
I'm using a Dell laptop with no dedicated PgUp/PgDn keys. They are Fn+UpArrow and Fn+DownArror. The Fn key is on the left side of the keyboard and the arrows are on the right. This means I have to use two hands to achieve PgUp/PgDn. I don't like it so after some googling I decided to remap the keys for PgUp/PgDn and use the Control_R key, because I probably never used that key and it's near the arrow keys. I created a .Xmodmap file in my home directory. Here's what's in the file:
keycode 105 = Mode_switch
keycode 111 = Up NoSymbol Prior
keycode 116 = Down NoSymbol Next
The settings work perfectly with almost all the apps I've installed: firefox/falkon/dolphin/gedit/libre office and even vim etc., but not with Plasma's default text editor Kate. Kate interprets the key combination Control_R+Up as simply Up, Control_R+Down as simply Down. I have a feeling Kate does not get the keysym from the underlying X system. Instead, it only gets the keycode, and probably the "state" bits, and do its own things.
Why is Kate so different from other apps in terms of handling keyboard input? Any solutions? Do I need to use xkb rather than xmodmap? I had a look at the Arch xkb wiki page. It seems much more complex than xmodmap.
Thanks a lot
[Update] I just found a solution. No need to use xmodmap. Instead, use KDE's shortcut function. System Settings->Shortcuts->Custom Shortcuts->Edit->New->Global Shortcut->Send Keyboard Input. On the Trigger tab, define the desired key combination. On the Action tab, in the text box, just type in the key name "Page Up" or "Page Down" without the quotes. Strangely, PgUp also works but PgDn is not recognized. It must be "Page Down". The solution works with all the apps I've tested, including Kate.
Last edited by learnarch (2020-09-25 04:03:39)
Offline
Pages: 1