Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

keymap not working when modmap bind the same key #332

Open
KAIYOHUGO opened this issue Aug 26, 2023 · 3 comments
Open

keymap not working when modmap bind the same key #332

KAIYOHUGO opened this issue Aug 26, 2023 · 3 comments

Comments

@KAIYOHUGO
Copy link

Thanks for this awesome project 馃

I use gnome with wayland, the default behavior of super key is open a select menu and this break my Function Key keymap.
I change setting make gnome bind SUPER_R as super key (Which doesn't exist), but I still want gnome super key to work.

TL;DR

I want to bind SUPER_L to SUPER_R when hold and work with keymap.

#modmap:
#  - name: Super Override
#    remap:
#      SUPER_L:
#        held: SUPER_R
#        alone: SUPER_L
#        alone_timeout_millis: 500
keymap:
  - name: Function Key
    remap:
      SUPER_L-1: F1
      SUPER_L-2: F2
      SUPER_L-3: F3
      SUPER_L-4: F4
      SUPER_L-5: F5
      SUPER_L-6: F6
      SUPER_L-7: F7
      SUPER_L-8: F8
      SUPER_L-9: F9
      SUPER_L-0: F10
      SUPER_L-MINUS: F11
      SUPER_L-EQUAL: F12
  - name: Other
    remap:
      SUPER_L-A: CAPSLOCK
@k0kubun
Copy link
Contributor

k0kubun commented Aug 27, 2023

I'm not sure what's the intention behind this:

#modmap:
#  - name: Super Override
#    remap:
#      SUPER_L:
#        held: SUPER_R
#        alone: SUPER_L
#        alone_timeout_millis: 500

the default behavior of super key is open a select menu and this break my Function Key keymap

Do you think SUPER_L triggers a select menu but SUPER_R doesn't? I haven't checked it myself, but I'd guess it's not how that works; SUPER_L and SUPER_R are both recognized as a super key and trigger a select menu, whether your physical keyboard has SUPER_R or not.

Why don't you remap SUPER_L to something else (like Alt) and use that as a modifer instead of SUPER_L?

@KAIYOHUGO
Copy link
Author

Does you think SUPER_L triggers a select menu but SUPER_R doesn't?

Yes, gnome tweak can change that.

image

My work around for now is complete disable super key behavior (open select menu), and it work well.

I'm not sure what's the intention behind this:

When i make this issue I still want SUPER_L to work because a lot of buildin shortcut need SUPER_L as modifer.

Some Note: Gnome's buildin shortcut don't have this issue, gnome is weird (Maybe it have some internal shortcut resolve mechanic).

@k0kubun
Copy link
Contributor

k0kubun commented Aug 28, 2023

OK, thanks for the information. I'm still not sure what you're trying to do.

If I understand the screenshot correctly, you assign SUPER_R to a select menu. Is that correct?

Then, how do you want to trigger that? It appears that you want to use held: SUPER_R for it, but it's strange because held is supposed to be used for a modifier, which is SUPER_L in the rest of your config.

Isn't this what you actually want to do?

modmap:
  - name: Super Override
    remap:
      SUPER_L:
        held: SUPER_L
        alone: SUPER_R
        alone_timeout_millis: 500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants