Fixing shift+home / shift+end on the Librem 15v4

Just solved this for one of my own machines, so figured I’d share.

If you’re using GNOME and struggling to get shift+home/end working without turning numlock on and off constantly, try the following solution:

tl;dr:

Check your existing settings:

gsettings get org.gnome.desktop.input-sources xkb-options

This will normally be empty, but if there’s anything in it, add it to the following command as additional items in the array.

gsettings set org.gnome.desktop.input-sources xkb-options "['grp_led:scroll', 'numpad:microsoft']"

Alternatively, use dconf-editor (sudo apt install dconf-editor) and navigate to the input sources option via GUI. Then paste the above array into the xkb-options field.

Hope this helps anyone else that’s been frustrated by this.

Edit: Important update, removed 'grp:alt_shift_toggle' from the list of settings. It appears that it interferes with moving windows across workspaces (ctrl+alt+shift+left/right no longer worked) and is unnecessary for fixing the shift+home/end problem.

2 Likes

Out of curiosity, what do Shift+Home and Shift+End do on Windows / do after the above change / do before the above?

Not disputing your claim but for me it isn’t. ['compose:ralt']

Out of curiosity, what do Shift+Home and Shift+End do on Windows / do after the above change / do before the above?

I’m don’t know about Windows, and what numpad:microsoft changes under the hood I’m not certain on.

What this fixes however, is when you have numpad disabled and try alternating between using home and shift+end or vice versa, for instance when copying lines of code in a text editor or browser bar. Before the change, holding shift will temporarily enable numlock, causing it to type the number 1 or 7 instead of highlighting the entire line as expected. Afterwards, this issue is resolved.

I would imagine most people who stumble across this will have been looking for a solution and already are familiar with the issue. The previous threads on this forum talk about the problem, but no solution was ever posted.

Not disputing your claim but for me it isn’t. ['compose:ralt']

That’s why I specifically mentioned checking for existing values. :sweat_smile: It’s likely that you have a keyboard layout that requires text composition (for typing characters like ö for instance). Choosing the standard US English - American English layout will have no existing options set, at least in my experience.

1 Like

Actually, sorry, I had brainfade. I didn’t pick up the potential difference in what Shift+End means i.e. Shift+KeypadEnd v. Shift+End using the dedicated End key. I’m using an external keyboard and the dedicated Home and End keys just work correctly, while the duplicates of the block of six keys (Insert, Home, PageUp, Delete, End, PageDown) that are on the keypad may be sensitive to the state of NumLock and interact with NumLock.

Anyway, thanks for the explanation.

1 Like