CTRL+ALT+F1,{F2..F6} doesn't work on a keyboard with media keys (but the media keys work fine)

Can’t drop to TTY from the graphical environment with CTRL+ALT+F1,{F2…F6}, nothing happens.

“sudo chvt 1” works in XFCE and then in tty (CTRL+)ALT+F2…F7 works, I can change tty and get back to XFCE with ALT+F7.

I tested also in Manjaro XFCE USB, same problem with both opensource and proprietary drivers: nothing happens when CTRL+ALT+F2 etc. is pressed

Please advise?

Do you maybe have a weird keyboard where you need to press the Fn key for the F keys?

Nope :frowning: Xfce shortcuts like CTRL+F1, ALT+F1 work fine, just not CTRL+ALT+F1,F2,F3…

…but it’s something quite similar related to the keyboard!

I tested with another (very basic) keyboard and it worked. Thank you for the tip!

This keyboard (Ducky G2PRO) has functions on the F1…F7 buttons accessible with Fn (mute sound, volume down, volume up, play/pause, previous track, next track)

xev output with a “basic” keyboard, CTRL+ALT+F3 switches to tty as expected:

KeyPress event, serial 601, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17515530, (-425,264), root:(766,889),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 601, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17516010, (-425,264), root:(766,889),
    state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

Expose event, serial 601, synthetic NO, window 0x4c00001,
    (0,0), width 178, height 10, count 3

Expose event, serial 601, synthetic NO, window 0x4c00001,
    (0,10), width 10, height 58, count 2

Expose event, serial 601, synthetic NO, window 0x4c00001,
    (68,10), width 110, height 58, count 1

Expose event, serial 601, synthetic NO, window 0x4c00001,
    (0,68), width 178, height 110, count 0

KeyRelease event, serial 601, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17518156, (-425,264), root:(766,889),
    state 0x1c, keycode 69 (keysym 0x1008fe03, XF86Switch_VT_3), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 601, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17518441, (-425,264), root:(766,889),
    state 0x1c, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 601, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17518441, (-425,264), root:(766,889),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

xev output with Ducky G2PRO with media keys under Fn+F1…F7, doesn’t go to tty

KeyPress event, serial 50, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17443827, (452,141), root:(1643,766),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 51, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17444163, (452,141), root:(1643,766),
    state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 51, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyRelease event, serial 52, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17444739, (452,141), root:(1643,766),
    state 0x1c, keycode 69 (keysym 0x1008fe03, XF86Switch_VT_3), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 52, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyRelease event, serial 52, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17445227, (452,141), root:(1643,766),
    state 0x1c, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 53, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 17445291, (452,141), root:(1643,766),
    state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Weirdly, it does trigger XF86Switch_VT_3

Is there a way to force the keyboard (with media buttons etc.) to behave like a basic keyboard?

I tested also this in /etc/X11/xorg.conf.d/00-keyboard.conf:
Option "XkbOptions" "terminate:ctrl_alt_bksp"

Seems to fail in a similar way, xev shows this when I press ctrl+alt+backspace

KeyPress event, serial 39, synthetic NO, window 0x4600001,
    root 0x6d3, subw 0x4600002, time 8236996, (18,22), root:(1209,647),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 39, synthetic NO, window 0x4600001,
    root 0x6d3, subw 0x4600002, time 8238820, (18,22), root:(1209,647),
    state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 39, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

When I release backspace it shows

KeyRelease event, serial 40, synthetic NO, window 0x4600001,
    root 0x6d3, subw 0x4600002, time 8242164, (18,22), root:(1209,647),
    state 0x1c, keycode 22 (keysym 0xfed5, Terminate_Server), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

When I release ALT it shows again a MappingNotify event

MappingNotify event, serial 40, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyRelease event, serial 40, synthetic NO, window 0x4600001,
    root 0x6d3, subw 0x4600002, time 8243860, (18,22), root:(1209,647),
    state 0x1c, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

…and finally releasing CTRL just looks normal.

Then if I connect a keyboard without media keys (and calculator, explorer, email, web browser keys) and hit CTRL+ALT+backspace, it works as intended: X is terminated and restarted

I guess it only sees the KeyRelease event, the press event is captured by something else?

The keyboard has an “n-key rollover” switch, I tried moving it last week but did not reboot the system.

So after disabling “n-key rollover” and rebooting, CTRL+ALT+F1 works!

Thank you zbe @ #manjaro IRC!

https://unix.stackexchange.com/questions/414071/how-do-i-switch-to-linux-terminal-from-xorg-via-xf86switch-vt-1-controlaltf1

“From what I’ve read elsewhere, the problem comes from the fact that the keyboard has to pretend it is multiple keyboards on USB because the USB standard only allows 6-key rollover per keyboard.”

This might be the root cause?

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.