question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gui.Shortcut: Binding to Ctrl key on Mac OS X?

See original GitHub issue

From the Shortcut wiki entry:

Supported keys: A-Z, 0-9, Comma, Period, Home, End, PageUp, PageDown, Insert, Delete, Arrow keys (Up, Down, Left, Right) and the Media Keys (MediaNextTrack, MediaPlayPause, MediaPrevTrack, MediaStop). Note that Shortcut.key can have exactly one keycode.

What’s “Comma”? If you try to add a Comma+V shortcut, it’ll complain that the key isn’t valid, so I thought it that’s just a typo in the wiki and should be “Command”. It doesn’t complain if you use Command+V (even on Windows) but it never fires the callback when the keys are pressed (on Mac OS X).


Modifiers: Ctrl (On Mac OS X, “Ctrl” correspond to the Command keys on the Macintosh keyboard), Alt, Shift. Note that Shortcut.key takes zero or more modifiers.

This is really weird. I think the user should have to check the current platform and bind to ctrl or command themselves accordingly. With the current implementation, how can I bind to ctrl on Mac OS X? It seems impossible.

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostoycommented, Nov 25, 2016

@fritx Actually the behavior was changed since 0.13.0. And now Command / Super / Cmd are the same key. On Windows & Linux, it is WinKey. On Mac, it’s Command key.

0reactions
fritxcommented, Nov 24, 2016

Now seems both Command/Ctrl work with 0.18.8 in Mac. I don’t have to forcibly replace Command with Ctrl in Mac any more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mac keyboard shortcuts - Apple Support
Command (or Cmd) ⌘; Shift ⇧. Option (or Alt) ⌥; Control (or Ctrl) ⌃.
Read more >
Key bindings - macOS - SS64.com
Key binding allow you to swap around the action of keys (or key combinations) on the Mac keyboard. The default key bindings for...
Read more >
Ctrl key on Microsoft keyboard does not map to Mac's command
It means the keyboard short cut you type in windows maps to a different keyboard shortcut in OSX. What the text means that...
Read more >
Mac OS change command to control key - Super User
Another downside... Command+Arrow buttons will swap based on application, not globally... Best solution is really to do a hardware swap. – Ray ...
Read more >
12 Keyboard Shortcuts for Navigating & Selecting Text in Mac ...
Bonus tip: You can select non-contiguous text blocks in Mac OS X by hold down the command key, as demonstrated here. These shortcuts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found