Alt+1 keyboard shortcut, where does it comes from and how to disable?

Hello there,

I am struggling to find where comes the alt+1 keyboard shortcut in cinnamon.
I have spent the last 4 hours searching on my system and the web, but I have no clue.

I would like to deactivate it, but I cannot find it in the “keyboard settings” nor when exploring the schema with dconf-editor.

Does anyone have the faintest clue where this shortcut comes from, and what it is supposed to do ?
It seems to highlight the window that is focused, and allow to switch from 1 window to the other if the application have several (like a web browser).

I searched in expo as well, and mutter and all the applets but could not find anything…
I don’t have much hope, but I welcome any suggestion.

1 Like

What does Alt1 do on your system?

1 Like

I didn’t even know this existed.
It refers to and takes me to the corresponding open browser tab’s - firefox
In mousepad as well - probably anything with tabs …
DE: Xfce

Alt + 1 moves focus to first tab in application.
Alt + 2 moves focus to second tab in application.
Alt + 3 …

This works on Firefox, Thunderbird, Hexchat, xed… I don’t know if it is a Cinnamon config.

Alt + 19 are commonly used shortcuts for switching between open tabs of an application. Firefox (in Linux, not in Windows), Chrome, Xed, Gnome terminal are some apps that use these keybindings.

Wikipedia Article:

Some apps, like Gnome terminal, offer a way to change these keybindings (Preferences → Keyboard), but many of them don’t allow any modifications to these shortcuts.

I don’t think there is a “global” way to disable these shortcuts, since they’re specific to applications that implement them.

Windows too as far as I recall.

In Windows it’s Ctrl + 19 to switch between tabs (typing from Firefox in Windows right now :blush:).

ho yeah I recalled wrong then. I knew I was switching like that sometimes.

I’d like to ask why this needs to be disabled. Are you accidentally pressing ALT+1?

4 hours work - you must be pretty serious about fixing this.

Is there a reason? But yes, Alt+[n] is one I’d forgotten, being too lazy (I use RMB and scroll the mousewheel to go through tabs).

No, it’s pretty ubiquitous - direct tab selection.

A simple script can fix it - bind it to a keyboard shortuct - ALT + 1

#!/bin/bash
notify-send 'STOP PRESSING ALT + 1'

Excellent.
Tested and working on KDE at least.
Mark solved?

It’s not that I want the shortcut to be disabled, but I would like the application with the focus to receive it.
I noticed it when using an IDE, I could not switch to the first open file, only the the 2nd and further one.
I can switch to the tab 2, 3, 4 with alt+number.
But alt+1 is intercepted.

Let me show you what happens in Firefox when I use the alt+number shortcut:
ht___tps://youtu.be/An85ELLAdSs
(Remove the triple underscore in the url, I am not allowed to include a link in my posts.)

And it looks like a cinnamon dialog.
Also, I have only xfce and cinnamon installed.
But now that I think of it, I did not looked in XFCE to see if anything was relevant there

So, no, not really solved.
It’s more an annoyance than something else, but now that I noticed it, it’s getting under my skin.

Thanks.

1 Like

I just tested in XFCE and Gnome, in those 2 DE the alt+number shortcut is sent to the application.
It just confirms me that it’s something in Cinnamon that interprets it as a shortcut and catch the keypress without sending it to the application.

Another strange thing.
I tried with xev to see what was sent as an event.
An ALT+2 makes this:
KeyPress event, serial 38, synthetic NO, window 0x7200001,
root 0x1df, subw 0x0, time 46674796, (72,-19), root:(100,77),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 38, synthetic NO, window 0x7200001,
    root 0x1df, subw 0x0, time 46675382, (72,-19), root:(100,77),
    state 0x8, keycode 11 (keysym 0x32, 2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XmbLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x7200001,
    root 0x1df, subw 0x0, time 46675530, (72,-19), root:(100,77),
    state 0x8, keycode 11 (keysym 0x32, 2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x7200001,
    root 0x1df, subw 0x0, time 46675940, (72,-19), root:(100,77),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

But an ALT+1 sends this:

KeyPress event, serial 38, synthetic NO, window 0x7200001,
    root 0x1df, subw 0x0, time 46752277, (158,145), root:(186,241),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 38, synthetic NO, window 0x7200001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 38, synthetic NO, window 0x7200001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 38, synthetic NO, window 0x7200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 38, synthetic NO, window 0x0,
    keys:  4294967263 0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 38, synthetic NO, window 0x7200001,
    root 0x1df, subw 0x0, time 46753251, (158,145), root:(186,241),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

I don’t know if this is relevant tough…

Dammit…

I just have found out what it was.
I am using a TKL keyboard (without the numpad, 86 keys), and I have set it up in the Manjaro hardware settings as such, with the “Generic 86 keys pc” keyboard.

Switching it back to a 104 keys keyboard made it so that my alt+1 is again sent to the application.
There must be something in there that makes the combination keypress interpreted differently.

Sorry to have bothered all of you, but thanks for looking into it.
In the end, nothing to do with Cinnamon.

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