3

On Linux systems Ctrl+Alt+F1 thru F6 open virtual terminals. It seems like there are only 6 of these. Sometimes F7 may also be used for the window manager but at least on my current system (18.04) it is F1 that brings me back to the desktop.

So I have some binds, and due to historical momentum I chose F10 as the key to swap with my caps lock, and so I want to set up various key combination binds with F10, e.g. Shift+F10, Alt+F10, etc. I use these key chords heavily in terminal since it's kind of a free source of extra keys, F10 is normally out of the way and won't get used.

So here's the problem, I can't really set up a Ctrl+Alt+F10 bind because on Linux it will go to a blank virtual terminal blinking cursor screen. I'd like to know if there is a way to disable this while keeping the 1 thru 6 tty's available for troubleshooting needs. Barring that it seems like Ctrl+Alt+F10 will be completely off-limits to me.

Steven Lu
  • 182
  • 1
  • 10
  • @guiverc You wrote "On my Ubuntu system the Ctrl+Alt+F1 switches to the GUI", I already stated in my question that my 18.04 system also does this. Note I don't have a problem with this and I want to just make Ctrl+Alt+F10 not do anything, but I do want to keep Ctrl+Alt+F1 behavior unchanged. And similar for Ctrl+Alt+F2, Ctrl+Alt+F3, etc. There is no tenth virtual console at all. So making it go to a blank screen would be useless. – Steven Lu Apr 17 '21 at 00:16
  • I'm basically asking the question posed in comments in here: https://askubuntu.com/questions/1231970/what-ctrl-alt-f10-does-on-linux-ubuntu-18-04-4 – Steven Lu Apr 17 '21 at 00:17
  • https://askubuntu.com/a/1322027/15811 – Rinzwind Apr 17 '21 at 01:23
  • No, that disables all of them. I absolutely cannot do that and lock myself out of all virtual consoles. – Steven Lu Apr 17 '21 at 01:39
  • 1
    Still, you could explore into that direction. The command given there is `setxkbmap -option srvrkeys:none`, so that could mean that you may change options to disable only a few. – vanadium Apr 17 '21 at 06:45
  • @vanadium You make a very good point, thank you for pointing that out. – Steven Lu Apr 17 '21 at 18:23
  • @StevenLu I explored a bit in that direction, but unfortunately, I did not find options to disable only a few with such option – vanadium Apr 18 '21 at 07:31

1 Answers1

0

Solution for Gnome Wayland:

You can unset the keybindings for virtual terminal switching by setting these dconf properties:

dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-7 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-8 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-9 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-10 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-11 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-12 "['']"
Eduard Wirch
  • 113
  • 4