How do I make Ctrl+Alt+F7 keyboard shortcut work in IntelliJ on Ubuntu 14.04

15,707

Solution 1

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.

Solution 2

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

Solution 3

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.

Solution 4

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"]'
Share:
15,707

Related videos on Youtube

Wojtek
Author by

Wojtek

Updated on September 18, 2022

Comments

  • Wojtek
    Wojtek over 1 year

    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?

    • muru
      muru over 9 years
      It'd be simpler to configure the IntelliJ shortcuts, IMHO: jetbrains.com/idea/webhelp/configuring-keyboard-shortcuts.ht‌​ml
    • Wojtek
      Wojtek over 9 years
      @muru Not in my case :/ I am using Windows, Mac and Linux depending on where I am (work, home, underground). I would like to have one short-cut map in IntelliJ.
    • Wojtek
      Wojtek over 9 years
      @muru Yeah, but I can not copy it to my co-workers box when I am pair-programming with him. I really wanna use the default keymap.
    • muru
      muru over 9 years
    • Wojtek
      Wojtek over 9 years
      @muru How do I change that option in Ubuntu 14.04 ?
    • Ziyan Junaideen
      Ziyan Junaideen about 9 years
      @Wojtek : Is your Alt key registering in Intellij. I am using RubyMine which I think both are related. It is not registering things like Alt + Button 1 Click.
    • Wojtek
      Wojtek about 9 years
      @ZiyanJunaideen what do you mean, sorry?
    • Shadoninja
      Shadoninja about 6 years
      For anyone like me who is here because their GUI just vanished and they have no clue how to get it back, ctrl+alt+F1 fixes it. You might have to click on the window again using your mouse if you are in a VM.
  • Wojtek
    Wojtek over 9 years
    Thanks Manish, but I do not want to change my shortcuts. I wanna keep them as they are.
  • Lee Meador
    Lee Meador over 9 years
    @Wojtek He is telling you how to change Ubuntu's use of the Alt-F7 key combination to some other key combination. That leaves it free for Intellij to use.
  • Wojtek
    Wojtek over 9 years
    @LeeMeador I believe he is talking about Andoid Studio (IntelliJ), not Ubuntu and using different shortcuts, not the detault ones, which is what I do not want to do. The only way to disable Alt+F7 in Ubuntu is via already mentioned DisableVTSwitch, but I do not know how to do it in Ubuntu 14.04.
  • Wojtek
    Wojtek over 9 years
    I cannot see any Ctrl+Alt+F[1-9] values in there. Also, all names switch-to-workspace-[1-12] are ['disabled'] already.
  • geronimo
    geronimo almost 5 years
    On my system they also were under that package. You can search for the switch-to-session-<X> shortcuts with the search tool of dconf-editor.