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.

7
  • @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, 2021 at 0:16
  • I'm basically asking the question posed in comments in here: askubuntu.com/questions/1231970/…
    – Steven Lu
    Apr 17, 2021 at 0:17
  • askubuntu.com/a/1322027/15811
    – Rinzwind
    Apr 17, 2021 at 1:23
  • No, that disables all of them. I absolutely cannot do that and lock myself out of all virtual consoles.
    – Steven Lu
    Apr 17, 2021 at 1: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, 2021 at 6:45

1 Answer 1

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 "['']"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.