Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

TIS API is deprecated #173

Open
mkrueger opened this issue Mar 9, 2022 · 0 comments
Open

TIS API is deprecated #173

mkrueger opened this issue Mar 9, 2022 · 0 comments

Comments

@mkrueger
Copy link

mkrueger commented Mar 9, 2022

Hi

I've tried to solve the keyboard shortcut problem and came accross the MASShortcut project. Really nice work. I tried a similiar approach using the deprecated TIS API.

However there is a reason apple dumped it: It doesn't work for all cases.
For example that API doesn't map the cut/copy/command cmd+c,v,x correctly.

There is an easy to use API in NSEvent:

https://developer.apple.com/documentation/appkit/nsevent/3242717-characters

That can be used instead the old carbon API and seems to work in the use cases I tested. It behaves a bit different but it's the way to go for us. The TIS API fails for example cut/copy/paste cmd+cxv keys on cyrillic layouts.

Hope that helps.

Note: Just checked the korean keyboard. The characters from the event need always to be taken into account as well unfortunately. It's quite complex to get key bindings working correctly.

Note: Situation is worse the new api doesn't recognize shift+option+. on korean - but the TIS does. So it's needed to query both APIs :( - it's a mess. But it solveable if the characters from the event, the new API and TIS is combined.

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

No branches or pull requests

1 participant