Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2732  / 3 Years ago, tue, october 12, 2021, 11:16:25

On earlier versions of Ubuntu, the AltF☒ and Alt shortcut keys for switching between virtual terminals seem to have been disabled under X Windows, so it wasn't possible to trigger them accidentally.



I'm now using Ubuntu 16.04 with Cinnamon desktop environment, and the shortcuts are enabled even under X Windows.



I frequently trigger them accidentally while trying to access menu items or to go forwards/backwards in a web browser.



How can I disable these virtual terminal shortcut keys, or replace them with the versions that require Ctrl (e.g. CtrlAltF1 instead of just AltF1)?



--



(I've found several older answers that suggest a custom xmodmap, but this seems to have no effect for me.)


More From » 16.04

 Answers
7

This thread at Unix stackexchange helped me figure out a temporary one-off solution:



# This command removes all the lines that look like:
# alt keycode 123 = Console_1'
# ... with no additional modifiers
$ sudo dumpkeys | grep -Pv '^s+alt(gr)?s+keycodes+d+s+=s+(Console_|Incr_Console|Decr_Console)'|sudo loadkeys


It seems that Ubuntu 16.04's console-setup package stores its cached keymap at /etc/console-setup/cached.kmap.gz.



But I can't figure out what program generates this "cache" in the first place. Any ideas? All I can tell is that re-running dpkg-reconfigure console-setup console-setup-linux triggers its regeneration.


[#14237] Wednesday, October 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ongdiligenc

Total Points: 452
Total Questions: 111
Total Answers: 107

Location: Ukraine
Member since Sun, Dec 13, 2020
4 Years ago
;