Can't use key combinations such as `Ctrl+Alt+F2` to switch to a different virtual console
See original GitHub issueOn other wayland compositors (e.g. river, sway) and X11 window managers, I can use key combinations such as Ctrl+Alt+F2
to switch to a different virtual console. In Qtile, this key combination has no effect. I have verified that the problem occurs with the default configuration. Perhaps Qtile is somehow “grabbing” certain keys.
$ qtile -v
0.18.1
To investigate this issue, I launched wev
from within Sway and pressed Ctrl+Alt+F2
. Note that wev
only reports the Ctrl
and Alt
press and release (at which point I was switched to virtual console 2).
[14: wl_keyboard] key: serial: 602; time: 93610128; key: 37; state: 1 (pressed)
sym: Control_L (65507), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000004: Control
latched: 00000000
locked: 00000000
[14: wl_keyboard] key: serial: 604; time: 93610376; key: 64; state: 1 (pressed)
sym: Alt_L (65513), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 0000000C: Control Mod1
latched: 00000000
locked: 00000000
[14: wl_keyboard] key: serial: 606; time: 93610740; key: 37; state: 0 (released)
sym: Control_L (65507), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000008: Mod1
latched: 00000000
locked: 00000000
[14: wl_keyboard] key: serial: 608; time: 93610740; key: 64; state: 0 (released)
sym: Alt_L (65513), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000000
latched: 00000000
locked: 00000000
Now compare this with what happens when I launched wev
from within Qtile and pressed Ctrl+Alt+F2
. Note that all three key press and release events are reported.
14: wl_keyboard] key: serial: 144; time: 93748304; key: 37; state: 1 (pressed)
sym: Control_L (65507), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000004: Control
latched: 00000000
locked: 00000000
[14: wl_keyboard] key: serial: 146; time: 93748695; key: 64; state: 1 (pressed)
sym: Alt_L (65513), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 0000000C: Control Mod1
latched: 00000000
locked: 00000000
[14: wl_keyboard] key: serial: 148; time: 93749077; key: 68; state: 1 (pressed)
sym: XF86Switch_VT_2 (269024770), utf8: ''
[14: wl_keyboard] key: serial: 149; time: 93749184; key: 68; state: 0 (released)
sym: XF86Switch_VT_2 (269024770), utf8: ''
[14: wl_keyboard] key: serial: 150; time: 93749504; key: 64; state: 0 (released)
sym: Alt_L (65513), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000004: Control
latched: 00000000
locked: 00000000
[14: wl_keyboard] key: serial: 152; time: 93749552; key: 37; state: 0 (released)
sym: Control_L (65507), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000000
latched: 00000000
locked: 00000000
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How can I get to a terminal or virtual console when Ctrl-Alt-F2 ...
Another thing you can try is the magic SysRq key: press Alt + SysRq + R to switch the keyboard away from raw...
Read more >Cannot switch to virtual consoles with Ctrl Alt Fx - Ask Ubuntu
I cannot switch from the GUI to any virtual console using Ctrl + Alt + Fx for any x=1,2,... (or any key combination...
Read more >CTRL ALT F2 once and for all!! - VMware Communities
I need to somehow change the key bindings in vSphere client ... rather than use the client to view the VM's console.
Read more >Display corruption when switching virtual terminals in Linux
For example, if I was watching a youtube video in VT1 and press CTRL-ALT-F2 to switch to VT2, where I am logged in...
Read more >[Solved] Switching virtual consoles and some keys stop ...
I also can't switch between virtual consoles with the keyboard ... and was unable to change to another tty using the alt+F* key...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve updated the wiki with this information: https://github.com/qtile/qtile/wiki/keys#switching-between-virtual-consoles-with-ctrlaltfn
It works! Thank you so much for the assistance. For the record, here’s the relevant snippet from the working configuration: