-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Question) Remap Copilot key #492
Comments
Oh boy, the Copilot key. That's been coming up on Reddit a lot lately. Blech. Seems to even work differently on different laptops. Well, first of all, "multipurpose" modmaps are for what other keymappers might call "overloading" a key. Giving it two different identities depending on whether it is tapped within a certain time threshold (defaults to 1 second in the config file) or held past that time (so it can be used with other keys as another modifier, typically). A common remapping is CapsLock to Esc & Ctrl. Which means you'd just want to do a normal Here's a central problem with such a "macro" key. There's no way that I am aware of to differentiate that Is there possibly any kind of firmware or software option to make that key do something else? Unless we can either change what the key does intrinsically, or find a way to identify that specific key being pressed as anything other than a generic I'd like to see the full The only other time I've seen something like this is when a laptop has some special macro keys, and usually there won't be much that can be done with that, unless there is some software that can disable those macros and turn the keys into regular keys again. Usually this happens on the F-keys row with unusual special functions, and inverting the F-keys functions in the BIOS can offer a mitigation of the problem. In this case I don't know what you can do unless there is something in the BIOS you can tweak. Many sad faces: 😢 😭 😞 😿 |
According to some sources, the shortcut that should actually be coming from that key is Modifier-only shortcuts do exist, (and have always been a bad idea, in my opinion), but if the Copilot key only does So I would try this: keymap("User hardware keys", {
# PUT UNIVERSAL REMAPS FOR HARDWARE KEYS HERE
# KEYMAP WILL BE ACTIVE IN ALL DESKTOP ENVIRONMENTS/DISTROS
# Catch and remap Copilot key shortcut?
C("Shift-Alt-F23"): C("RAlt-Super-F23"),
}, when = lambda ctx:
cnfg.screen_has_focus and
matchProps(not_clas=remoteStr)(ctx)
) If you use It's still probably not really possible to force it to be a BTW, there's no |
This is what
I don't see any F23 there. Does this mean it's sending LShift+LMeta+Enter? |
I'd assume the same way it differentiates between pressing Super to open the start menu and pressing Super as part of a combo.
I want to set it up to be a Compose key. These are the options in KDE: I wanted to choose "Third level of Right Win", which is equivalent to AltGr+RSuper. |
This is what happens when I run
|
Yeah, this doesn't work: keymap("User hardware keys", {
# PUT UNIVERSAL REMAPS FOR HARDWARE KEYS HERE
# KEYMAP WILL BE ACTIVE IN ALL DESKTOP ENVIRONMENTS/DISTROS
# Catch and remap Copilot key shortcut?
C("Shift-Alt-F23"): C("Shift-Super-Print"),
}, when = lambda ctx:
cnfg.screen_has_focus and
matchProps(not_clas=remoteStr)(ctx)
) (Shift-Super-Print launches Spectacle, the KDE screenshot program, in rectangular region capture mode.) |
The way that It's definitely not doing
Yeah, that only works in a desktop environment where they have somehow implemented the ability to respond to a modifier-only shortcut. Xubuntu does it with a third-party utility, GNOME has the Super key shortcut built directly into the shell, and doesn't support other kinds of modifier-only shortcuts. Cinnamon might have it hard-coded into the app launcher menu applet, I'm not sure. Plasma just implemented full support for all modifier-only shortcuts (other than Super/Meta/Win/Cmd, which was previously hard-coded) very recently. I think that came in Plasma 6.1. You're using Plasma 6, so in theory you can have Plasma recognize it as a modifier-only shortcut. It will still come out as And then of course there would still be the issue that the same modifier-only shortcut would be triggered if you ever press and release the real It's really bizarre to me that there isn't a full shortcut coming from the key, or at least that Without finding some other software that can modify or detect the Copilot key press as a unique thing, I don't know what else to offer you as a way to make it useful. That's very frustrating. |
I am very surprised by this new information, but it looks like the problem with detecting the Copilot key macro in Linux, at least the F23 part, was because the Linux kernel was ignoring the F23 scan code. It just wasn't in the Supposedly this will be patched in kernel 6.14, so this will become a question of how soon any particular Linux distro will make that kernel version available, or whether this patch will be backported to any earlier kernel versions. If you're on something like Arch, Tumbleweed or Fedora (particularly Fedora Rawhide) you'd probably be one of the first to see the kernel with the patch. A Brodie Robertson video on YouTube clued me in to the cause, and the fix that should be coming. References: https://www.theregister.com/2025/01/24/copilot_key_linux/ https://www.phoronix.com/news/Linux-6.14-Input https://patchwork.kernel.org/project/linux-input/patch/[email protected]/ If I understand the situation correctly, once anyone gets this patch in their kernel, the I don't know what I was thinking earlier with the example remap, but the following keymap should cause the Toshy diagnostic dialog (a keymap("Copilot key test keymap", {
C("Shift-Super-F23"): notify_context, # Show the diagnostic dialog when pressing Copilot key
}, when = lambda ctx:
cnfg.screen_has_focus and
matchProps(not_clas=remoteStr)(ctx)
) Once it actually starts working, the remap can be changed to anything like a typical combo or macro. Or the remap could be removed, and the But the Copilot key still won't be usable as a modifier key with this keymapper, since |
Ok, great! I wonder if I can configure KDE, IBus, or fcitx5 to recognize it as a Compose key; otherwise, I might just map it to open the start menu or open Spectacle. Also, some kernel modules I need have stopped building on newer versions of Tumbleweed so I'm stuck on an older version for now. |
That seems unlikely. Like Fedora is still on 6.12.x in stable, and only beginning to use 6.13 recently in Rawhide, I think. It will probably be some time before 6.14 is available in anything as the stable kernel branch. Maybe a month or two, at best, in most of the leading-edge distros. I'm more curious whether the patch will be backported to any LTS kernel versions. You won't be getting kernel 6.14 even on AlmaLinux/RHEL/CentOS Stream 10 beta, but I'm sure many Linux users will want to run distros like that on a device with a Copilot key. So it's a weird situation. Do let me know if at some future date you get 6.14 and find that the Copilot key's |
Rather than including a right Ctrl key, my laptop comes with a Copilot key. It produces the key combination LShift+LSuper, which toshy converts into LShift+LAlt. I would like to remap this to another combination, but
does not work since Shift-Alt is a modifier-only sequence. Do I need to multipurpose_modmap Alt to F19?
The text was updated successfully, but these errors were encountered: