12

There is already a partial solution to the problem documented on askubuntu.com.

Unfortunately, it is not working for Ctrl+Alt+F[1-7] keys. There was a solution for that in Ubuntu 13.04 and eralier to enable "Special keys (Ctrl+Alt+key) handled in a server" in Keyboard Layout -> Options -> Miscellaneous compatibility options. There is also a general X11 xorg solution, but does nor work with Ubuntu 14.04 since it has no /etc/X11/xorg.conf. Also, I cannot find the corresponding option in gnome-tweek-tool, which is supposed to be used in this case according to Ubuntu developers.

How do I enable special keys Ctrl+Alt+F[1-7] in the server so that IntelliJ shortcuts work in Ubuntu 14.04?

Wojtek
  • 793

5 Answers5

9

You can use Ctrl+Alt+7 (rather than Ctrl+Alt+F7) and Alt+F7. you can change the default ubuntu keymap setting by setting->keyboard-> shortcuts->windows->move windows change "move window" shortcut and use Alt+F7 in android studio. It works.

snoop
  • 4,110
  • 9
  • 41
  • 58
3

In Ubuntu 14.02 you can change those workspace keys by

  1. "Start"-menu > System Tools > dconf Editor
  2. Navigate to org > gnome > desktop > wm > keybindings

Click on the key you want to "give its freedom" and change it. I changed F7 to F7.

After that IntelliJ recognized the key combination

2

As Lee Meador mentioned, dconf-Editor should have the binding. It might be the case that it's under a different package though. For me the bindings for Ctrl+Alt+F* are under org.gnome.mutter.wayland.keybindings.

Dima
  • 21
1

Lee's answer points in the right direction, but in Ubuntu 17.04 there is no "F7" keyboard mapping, so you cannot map it to "F7". However, the following did the trick for me:

dconf write /org/gnome/desktop/wm/keybindings/begin-move '["<Control><Shift><Alt><Super>F7"]'
dconf write /org/gnome/desktop/wm/keybindings/begin-resize '["<Control><Shift><Alt><Super>F8"]'
0

I found it! I found it!
(I copied my answer to this chat too)

There is a simple command line to disable the shortcuts Ctrl+Alt+F [1-7].
I don't know which versions of ubuntu support this command line, but on Ubuntu 18.10, it seems to work well.

setxkbmap -option srvrkeys:none

But the command line only seems to work when it is executed after the login: After each lock/logout, the shorcuts Ctrl+Alt+F [1-7]. Are enabled again.
I tried to put this line in "Startup Application" and also in ".profile". Either way, it doesn't work.

So I created a new shortcut that executes this command by pressing (for example) Super+F7. And it works fine!
I just must do Super+F7 after each login, and if after I do Ctrl+Alt+F7 there isn't any black screens!


Does someone know a better way to run a command line after the login?
Am I obliged to do Super+F7 after each login?