11

I have Intellij Idea, which has its own shortkeys bound to Ctrl + Alt + F10, and I got some weird screen blackout after pressing these keys on my Ubuntu.

I was only able to switch my screen back after pressing Super + F2.

What does this key combination do? How can I disable it?

Zanna
  • 72,471
  • in this case I have so far pressed Ctrl + Alt + Del and unfortunately lost all unsaved data every time. Your way (Super + F2 btw for me Super + F1 woks) seems to me to be better in his regard. – SL5net Mar 08 '21 at 12:12
  • I tried to bind this key combination for the 'Turn off microphone' action (via the Globalse shortcut menu) but it didn't work. The same thing happens as you described in the question. (i escape with Ctrl+Alt+F1 then) – SL5net Mar 08 '21 at 12:19
  • I would say it's very odd to be integrating a desktop distro where you can shoot yourself in the foot like that, I can hardly see why keeping this option active by the default installation is warranted. I mean, it's a rather terrible dead-end for the typical end user. – matanox Mar 16 '21 at 22:16

3 Answers3

13

These keys switch to virtual consoles, in as far as these are active. In a default installation of Ubuntu, no consoles are set up above Ctrl+Alt+F6, which is why you see nothing more than a blinking cursor after pressing that keyboard combination. Hit Ctrl+Alt+F2 or simply Alt+F2 to return to your graphical desktop. You have virtual consoles available on Ctrl+Alt+F3 up to F6.

vanadium
  • 98,427
  • 2
    Is there a way to remove these keys? I don't see anything in keyboard shortcuts settings – Igor Tiulkanov Apr 27 '20 at 15:52
  • 1
    btw, what's a point of having these? I am always can open up terminal inside of Linux, why do I need these external ones? – Igor Tiulkanov Apr 27 '20 at 15:53
  • 2
    It is the historical way of multitasking in unix, before graphical environments were started by default. The keybinding is not controlled by your desktop environment, but deeper in the basis system, perhaps at the level of the kernel? – vanadium Apr 27 '20 at 15:57
  • i need litle modification. to return to your graphical desktop i needet Ctrl+Alt+F1. here in Kubuntue 20.4 not works Ctrl+Alt+F2 or Alt +F2 for that . Maybe Manjaro Linux does work like so? – SL5net Mar 08 '21 at 12:24
  • @SL5net it indeed depends on how the distro is set up. On standaard Ubuntu, login manager GDM runs on TTY 1, and the user session on TTY 2. Previously, the graphical session was on TTY 7 – vanadium Mar 08 '21 at 13:22
  • On Xubuntu (v 22.04), the graphical session still runs on tty7. – Teemu Leisti Oct 05 '22 at 23:06
2

As explained here https://askubuntu.com/a/1315576/1017209 you could use into your console or sh-batch-file

setxkbmap -option srvrkeys:none

to disable all ctrl + alt + Fxxx hotkeys

i have tested this in Kubuntue 20.4

SL5net
  • 698
  • 2
    I wonder if one would miss any of these combination in sane usage scenarios. The one this OP asks about is really pathological ... – matanox Mar 16 '21 at 22:13
  • 1
    @matanox : 1000% yes! The first few times I hit CTL+ALT+F10 (because it's a standard emulation mapping for me) my GUI just stopped working as if the computer had frozen, and I rebooted. – Cornelius Dol Jan 27 '25 at 23:47
0

Although this has been answered I'd like to add how I fixed this issue since setxkbmap did not do the trick for me.

For me these 12 commands did it.

These keybindings were set to ['F1'] ~ ['F12'] and what I did was I just set them to empty array.

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 1 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 2 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 3 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 4 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 5 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 6 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 7 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 8 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 9 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 10 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 11 "[]"

gsettings set org.gnome.mutter.wayland.keybindings switch-to-session 12 "[]"

Obviously this fix only applies to people who use Gnone + Mutter + Wayland (I use Redhat linux)

How I found this fix: gsettings list-recursively | grep F10

To find out all the keybindings that includes F10 and then among many results, I saw org.gnome.mutter.wayland.keybindings switch-to-session-10 ['<Primary><Alt>F10']

So I figured that keybinding must be it, and ran

gsettings list-keys org.gnome.mutter.wayland.keybindings to find out all the similar keybinds

Lastly, I thank this thread and especially the user who commented Super+F2 recovers the computer back to GUI from the black screen. Saved countless rebooting for me