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

Can't capture numbers and letters #113

Open
cristibaluta opened this issue Nov 16, 2017 · 3 comments
Open

Can't capture numbers and letters #113

cristibaluta opened this issue Nov 16, 2017 · 3 comments

Comments

@cristibaluta
Copy link

Hi, I'm building an app that when is visible (it's a borderless window so even if he app is front most the active app is the one behind it) it captures all the important keys and does something with them. All works fine except when I enable the sandbox, then only the arrows and backspace and enter is captured, if I type letters and numbers they go to the active app.
Is this a limitation of sandboxed apps or i'm doing something wrong?

@jhoughjr
Copy link

I'm having a similar issue, no sandbox, non menu bar app. The MASShortcutView only accepts modifier keys and dunks for any alphanumeric.

@Elpidam
Copy link

Elpidam commented Jan 3, 2019

@jhoughjr This is because MASShortcutView uses RegisterEventHotKey Carbon function which, by definition, registers modifier keys + alphanumerics or keys like space or Tab which are neither alphanumeric nor modifier keys.
I wish there was a way to capture just an alphanumeric without any modifier key involved. Some apps do it (not sandboxed ones).

@cristibaluta
Copy link
Author

cristibaluta commented Jan 11, 2019

I think is not about what MAS uses but about the sandbox, if they allow this some random utility in your status bar could steal what you type in other apps.
You can capture any key if is not a sandboxed app, not sure why you say you wish you can, i'm using. this to populate a search field when my borderless app is on screen

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

3 participants