8

Can someone please give definite answer to this? These shortcuts are very common for any developer practically in any ide... I have no idea why it should take more than an hour to search for a way to disable these and nave no result...

Whenever i press this combination (which should find usages in my code) my os goes blank and gets back to life with Ctrl+Alt+F1.

Any help is appreciated. I'm sure i'm not the only one having this issue.

4
  • In most Linux desktop distros, Alt-Ctrl-Fn switches the display to virtual screen "n", where 1-6 are plain TTY terminals and 7 is the X-Window/UI one. I assume these key combos are intercepted very early in the event chain and that the UI doesn't see them. Likewise, your graphic screen manager and desktop shell are probably intercepting other Alt-Ctrl keystrokes. My rather vanilla Eclipse Neon on Ubuntu doesn't define any Alt-Ctrl-Fn key, and hasn't got many Alt-Ctrl-anything.
    – xenoid
    May 25, 2019 at 13:01
  • every IDE is different and has its own set of shortcuts. Even tab control shortcuts are different between them
    – phuclv
    May 25, 2019 at 13:50
  • idea has nothing to do with this, why should it be such a pain to get rid of something as simple as a shortcut :|
    – vach
    May 25, 2019 at 14:03
  • Try the methods in the post Rebinding/disabling CTRL+ALT+F# and tell us if one has worked for you (this kind of thing changes between releases).
    – harrymc
    May 25, 2019 at 20:25

1 Answer 1

4

The following method works for me on Kubuntu 18.04.2 LTS. It should work for you if you're using X (but I don't expect it to work in Wayland).

This answer reads:

You have two different keymaps. One used by your graphical environment (X) and one used by you console.

The first one is configured by xmodmap and setxkbmap. The second one is configured by loadkeys.

You can dump the first one with xmodmap and the second one with dumpkeys.

The output of xmodmap -pke (run it from within your graphical environment) contains something like

keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7

To do what you want you need to replace XF86Switch_VT_7 with F7. Invoke

xmodmap -e 'keycode 73 = F7 F7 F7 F7 F7 F7 F7'

From now on Ctrl+Alt+F7 won't switch to VT_7. If you need to switch anyway, you can

  • bind XF86Switch_VT_7 to another keystroke,
  • or "transit" through any non-graphical console (e.g. hit Ctrl+Alt+F3) where xmodmap has no jurisdiction and Alt+F7 (or Ctrl+Alt+F7) switches to VT_7.

In my tests I confirmed I can then bind and use Ctrl+Alt+F7 in VLC. Other GUI applications should be able to use the shortcut as well.


I'm on Kubuntu 18.04.2 LTS and I can make the solution permanent by pasting

keycode 73 = F7 F7 F7 F7 F7 F7 F7

into my ~/.Xmodmap file. This works because /etc/X11/Xsession sources files from /etc/X11/Xsession.d/; one of the files is 80kubuntu-xmodmap which makes xmodmap execute $HOME/.Xmodmap (if it exists).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .