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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate between left and right modifier keys #2988

Open
LiamKearn opened this issue Nov 16, 2023 · 3 comments
Open

Differentiate between left and right modifier keys #2988

LiamKearn opened this issue Nov 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@LiamKearn
Copy link

LiamKearn commented Nov 16, 2023

Is there any way Alt-Tab could differentiate between left and right modifiers?

This would allow a lot of apps to pass through what I imagine are common shortcuts via utilising a non-prefered set of modifiers. e.g. I would love to be able to use Left-CMD-Tab to switch windows with alt tab and then Right-CMD-Tab to cycle tabs in my browser or other applications. Others may prefer to use Right-CMD for AltTab and be able to fall back to their mac default when they're using that.

A quick google&github search yields the following snippets which might be one route but I have no background in swift, if this gets 10 reactions from others that would find this useful and someone @'s me I'll contribute it anyway :)

My initial (probably horrid) idea for UI is to add a simple dropdown in the same section as the modifier key which allows selecting from:

  • Both - Both modifiers will trigger the shortcut
  • Left - Only the left hand modifiers will trigger the shortcut
  • Right - Only the right hand side modifiers will trigger the shortcut

Here is a very quick and dirty mockup I made in preview by copying and pasting the ui elements:
Screenshot 2023-11-16 at 9 32 07 pm

Please upvote to encourage me to be productive here 👍🏻

@LiamKearn LiamKearn added the enhancement New feature or request label Nov 16, 2023
@lwouis
Copy link
Owner

lwouis commented Nov 16, 2023

Hi @LiamKearn,

This is an interesting idea. I'm not sure if it's doable at a fundamental level. I'm not sure all keyboards send different signals for left or right modifiers.

In any case, we use the great ShortcutRecorder library to handle shortcut capture/customization in the Preferences. You'll have to work there to achieve this ticket. I suggest you get in touch with the main maintainer before moving forward. This will also help clarify if he will merge your PR, or if we will need to add your commits to my fork of the repo.

Thank you

@GabeKuslansky
Copy link

@lwouis

I'm not sure if it's doable at a fundamental level. I'm not sure all keyboards send different signals for left or right modifiers.

I believe it is technically possible per rcmd, but I'm unsure how non-trivial it will be to implement and handle all keyboards.

@LiamKearn
Copy link
Author

LiamKearn commented Feb 14, 2024

@GabeKuslansky If you're interested in this, @decodism has a remote&branch available which I'm using that does this as per #2993.

The issue is now blocked on UI, it's probably not the most common thing to want to do and the UI complication won't appeal to all.

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

No branches or pull requests

3 participants