I recently installed Ubuntu Server 16.04.2 (because most programs I use have a cli interface) and whenever I try to use (Alt+left/right arrow key) keyboard shortcut, for Weechat, the tty switches instead of the irc channels I have open. I want to keep the option to switch ttys and use just CtrlAltF1, etc. Could someone help me please? Thank you.
Ubuntu – How to disable TTY switching with alt+arrow-key shortcut
key-bindingservertty
Related Question
- Ubuntu – How to type curly braces while using the TTY
- Ubuntu – Switching tty shortcut
- Ubuntu – Change Default TTY shortcut
- Ubuntu – How to disable the shortcut Ctrl-Alt-Arrow in GNOME 3.8
- Ubuntu – Problems with TTY and ALT+F4
- Ubuntu – Super and arrow key has started switching tty
- Ubuntu – Kubuntu – How to remove ALT+F# keybinding to switch ttys
Best Answer
Through some research I was able to figure out what the problem is. X server is not grabbing the keyboard.
This is what I had in my /etc/X11/xorg.conf:
Section "InputDevice" Identifier "Keyboard0" Driver "evdev" Option "Device" "/dev/input/event1" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us,us" Option "XkbVariant" "oss,bepo" Option "XkbOptions" "grp:shift_toggle,grp_led:scroll" EndSection
Add
Option "GrabDevice" "True"
to before the "End Section"Worked for me on Ubuntu 18.04.1 LTS
If your xorg.conf does not exist, then just create a new section for keyboard with only the new line in it.