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

Keycode should not move when changing the language. Or optionally move #2400

Closed
henri-tremblay opened this Issue Apr 5, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@henri-tremblay
Copy link

henri-tremblay commented Apr 5, 2018

Description of bug/feature request/question:

I use two keyboard layouts. When on the US keyboard, I can Cmd+` to switch window. So far so good.

But when switching to CA_fr, this key becomes Cmd+ù. But it is the same physical key (same keycode).

So, to workaround Apple being dumb I want to use BTT.

The idea is that if I press Cmd+ù, it should call the switch window. I don't think I can bind directly "switch window", I can't find it in the available actions.

And I can't forward Cmd+ù to Cmd+` because BTT is switching the letter according to the keyboard layout. It probably makes sense in most cases but not in this one.

The keycode of Cmd+ on the CA_fr keyboard is Cmd+Opt+\ on the US keyboard. So to make things simple, when on CA_fr I want Cmd+ù to transform into Cmd+Opt+\ and when on the US keyboard, I want nothing (or anything that won't interfere with Cmd+).

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):

Keyboard

Device information:

Type of Mac: MBP (previous versio, no magic bar)
macOS version: 10.12.6
BetterTouchTool version: 2.422

@fifafu

This comment has been minimized.

Copy link
Collaborator

fifafu commented Apr 5, 2018

I haven't found a reliable way to do this. Unfortunately all the APIs BTT uses work with the keycodes. #518

@fifafu fifafu closed this Apr 5, 2018

@henri-tremblay

This comment has been minimized.

Copy link
Author

henri-tremblay commented Apr 5, 2018

Can't you just remap a keycode to another one when in a given language?

@fifafu

This comment has been minimized.

Copy link
Collaborator

fifafu commented Apr 5, 2018

No I probably won't tackle that. It is super complicated and ugly.

//edit: nah stupid me confused two issues.

@fifafu

This comment has been minimized.

Copy link
Collaborator

fifafu commented Apr 5, 2018

Haha sorry for the complete confusion, I shouldn't have so many tabs open.

Actually the Apple Script solution may work in your case...
So again, maybe try to assign the predefined action "Run Apple Script (enter directly as text)" to the cmd+ù shortcut and enter this apple script:

tell application "System Events"
	keystroke "`" using command down
end tell
@henri-tremblay

This comment has been minimized.

Copy link
Author

henri-tremblay commented Apr 5, 2018

Thanks. I will try. Am I right to say that the Window switch is not an available event in BTT?

@henri-tremblay

This comment has been minimized.

Copy link
Author

henri-tremblay commented Apr 23, 2018

You're a magician! It works perfectly!

@lock

This comment has been minimized.

Copy link

lock bot commented Nov 8, 2018

This issue has been locked automatically. The BetterTouchTool issue tracker has moved to https://community.folivora.ai. In case you still experience the issue please create a new post there.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 8, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.