7

By default switching between consoles is evaluated by keys CTRL+ALT+Fx (1-6)

How to change these hotkeys? Is there any config file for doing this?

3 Answers3

4

Oneiric provides a utility for this. Forgive the cattiness of this post; I can't for the life of me figure out why Ubuntu continues to ship with these keyboard shortcuts enabled in the first place.

Click on the "Dash Home" icon in the top/left end of your toolbar, and search for "keyboard". Open "Keyboard Layout", select the (typically only) layout in the list (why isn't it preselected for you?), then click "Options" and open up "Miscellaneous compatibility options". Select "Special keys (Ctrl+Alt+) handled in a server". Spend the next thirteen seconds thanking the developer who added this little checkbox, and the next ten wondering (again) why the little checkbox isn't checked by default.

In good humor, JB

JB3
  • 56
3

Those shortcuts are not defined by ubuntu, they are part of the basic linux kernel keyboard drivers. Changing them appears to be possible by following the instructions here:

http://www.linuxjournal.com/article/187

The basics are that you need to create your own custom keymap file, then set up a custom upstart job to load that at boot time. Note that you can make your keyboard completely unusable by doing this, so test it out before setting up the upstart job.

  • 1
    I'm asking this, because I've noticed that these hotkeys have been changed somehow. Now, if I press ALT+F4 I open the forth console. ( It's everything OK with my CTRL button ) – Gray Bananas Nov 10 '11 at 19:10
  • alt-f4 has always been an alternate shortcut for this, but the X11 GUI overrode it to 'close window'. If you're in a virtual console, alt-Fx is expected to switch you to another virtual console. If alt-f4 is switching to a virtual console for you from the GUI, then possibly the GUI shortcut got removed somehow? – ImaginaryRobots Nov 10 '11 at 19:28
  • OK, i've undestand, i'll research this. alt+f4 is not the only hotkey that works in such a weird way for me ( from gui ) – Gray Bananas Nov 10 '11 at 19:33
0

Using dconf-editor, check the values of some of your config. E.g., on my machine, org/gnome/mutter/wayland/keybindings had some values set that may cause this.

View all the config by calling

dconf dump / | less

in your shell.

On my system, I also had to restart to make the changes stick.

RobertG
  • 101