You are not logged in.
Got a new laptop with numeric pad, but no PgUp/PgDown buttons and instead being seemingly mapped to numpad's 9 and 3 keys.
So with NumLock switched off I use ctrl+pgup and down for tab navigation in all supporting apps. There is no problem with web browsers such as Firefox, and maybe other apps; but namely with Terminal and Mousepad tab navigation simply doesn't work.
I have to connect an external USB keyboard to make it work.
Nor holding additional keys such as Fn or Alt works.
I'm using Opensuse leap.
Can you help?
Thanks.
Last edited by sonycdr (2023-08-19 18:01:03)
Offline
Any ideas yet?
Offline
Try running the following command in a terminal window:
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'
A white input box will display. If you press any keys, the terminal window will display the codes of the keys you press.
On my laptop, which has a "pg dn" key, if I press Ctrl+pgdn I get:
37 Control_L
117 Next
...both firefox and mousepad move to the next tab.
I also have keypad keys mapped to other keys available via the Fn key. So if I press Ctrl+Fn+[3], I get:
37 Control_L
89 KP_Next
...and only firefox moves to the net tab. I can go into mousepad's shortcut editor and change "Next Tab" shortcut to this second shortcut and tab switching will work.
My guess is that firefox listens for both combinations, where as Xfce processes them separately.
Do you get the same difference in keycodes being recognized as I do?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Tried the "ev" command: "Command not found"
However all the behaviors you describe sound very similar if not just the same as the issue I have here, so probably I'd get the same outputs
I also read this: https://docs.xfce.org/apps/mousepad/start#keybindings
But alas, Opensuse leap 15.4 despite shipping Mousepad 0.5.9 ships only Xfce 4.16, so I don't have shortcut editor at all...
What else could I do?
Thanks.
Offline
Tried the "ev" command: "Command not found"
Sorry, that should have been "xev". I'll correct my post.
I also read this: https://docs.xfce.org/apps/mousepad/start#keybindings
But alas, Opensuse leap 15.4 despite shipping Mousepad 0.5.9 ships only Xfce 4.16, so I don't have shortcut editor at all...
Prior to the shortcuts editor being available, you could manually edit the ~/.config/Mousepad/accels.scm file (make sure mousepad isn't running at the time of edit).
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I get exact same outputs as you; just that this laptop does have numeric KP, but no "PgUp/Dn" keys at all, except somewhat mapped in KP itself. Also "Fn" key triggers no event or change at all.
Regarding accels.scm, this is what I have related to this:
; (gtk_accel_path "<Actions>/win.document.previous-tab" "<Primary>Page_Up")
[...]
; (gtk_accel_path "<Actions>/win.document.next-tab" "<Primary>Page_Down")
I once tried just removing the semicolons at the beginning of the lines, of course doing it with Mousepad closed and using another editor. Opened and closed Mousepad after this, then checked again the config file. Result: semicolons back there, entire file as it originally was...
Was that expected behavior?
How can I edit that for the "KP_Prior/Next" shortcuts?
And how to do the same for xfce4-terminal? Because here I also have the exact issue
Thanks again.
Last edited by sonycdr (2022-11-10 18:20:04)
Offline
I have the following in mousepad's accels.scm:
(gtk_accel_path "<Actions>/win.document.next-tab" "<Primary>KP_3")
...and:
(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Primary>KP_3")
...in ~/.config/xfce4/terminal/accels.scm (for xfce4-terminal).
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks very much, that finally worked; though for xfce4-terminal case it's "prev-tab" and not "previous-tab" like Mousepad...
This works for both apps, but only when NumLock is on; meaning it's really taking exactly numpad's *numbers 3 and 9* instead of their mapped functions when NumLock is off.
I mean, for example, KP_7 has "Home" function mapped when NumLock is off and without need for the "Fn" key. KP_1 has "End", KP_0 "Insert", KP_. "Del". All of these have always worked like this with xfce4-terminal and Mousepad, *except* KP_9 "PgUp" and KP_3 "PgDn". These last 2 only work with, say, Firefox.
Could there be an explanation for this?
Thanks again.
Offline
Nevermind, I managed to figure out: set shortcuts to "KP_Prior" and "KP_Next".
So in the end, what I needed to learn since the beginning was the *key's actual names*; and it seems this is done with this "xev" command.
Thanks very much.
But just curious, why do you pipe "xev" output to "awk"?
Also, could someone please mark the thread as "SOLVED"? Thanks.
Last edited by sonycdr (2022-11-10 20:07:16)
Offline
But just curious, why do you pipe "xev" output to "awk"?
xev on it's own generates alot of output that is hard to read and parse (mouse movements, keyboard actions). This command filters out all the noise and just displays whats been pressed on a keyboard.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 562.12 KiB (Peak: 578.96 KiB) ]