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

macOS: Capslock non-ideal for control group due to hard-coded delay by the OS #43

Open
ericvw opened this issue Jul 14, 2020 · 2 comments

Comments

@ericvw
Copy link

ericvw commented Jul 14, 2020

macOS hardcodes a delay on Capslock to avoid accidental key presses, which makes using Capslock for gaming non-ideal because the key actuates on every other click 😞. I'm not sure if they are enough keys to make TheCore Lite workable out-of-the-box on both macOS and Windows.

Since I was unable to use Capslock, I ended up rebinding control group 6 to the grave key instead. So my control group setup ends up being:

Grave 1 2 3
Q W
A S
Z X

I understand that the current usage of the grave key is to be able to quickly steal units and I am forgoing that functionality. One advantage of my tweak was that all the key combinations for manipulating control groups are similar (i.e., requires combinations of Ctrl, Alt, Shift) without a direct outlier key for manipulating control groups.

Tangentially, I also have rebound Capslock to be the Esc key, which now keeps on or below the number row of the keyboard.

I created this issue to explore if there is an opportunity to accommodate a key layout that would work consistently across Windows and macOS. However, I also understand there are other driving principles that may favor Capslock's usage as well. Thanks in advance!

@karmakaze
Copy link

I have a workaround for this issue with macOS. I also rearrange my Tab, CapsLock, Shift, Option/Alt keys using a defaults write script. I also use thumb for Cmd rather than use Ctrl so everything is in easy reach. This Apple Technical Note TN2450 shows the mapping codes.

starcraft-keys

  • remap Tab->Shift, CapsLock->Tab, LeftShift->Alt
#!/bin/bash
hidutil property --set '{ "UserKeyMapping": [{ "HIDKeyboardModifierMappingSrc": 0x70000002B, "HIDKeyboardModifierMappingDst": 0x7000000E1 }, { "HIDKeyboardModifierMappingSrc": 0x700000039, "HIDKeyboardModifierMappingDst": 0x70000002B }, { "HIDKeyboardModifierMappingSrc": 0x7000000E1, "HIDKeyboardModifierMappingDst": 0x7000000E2 }] }'

starcraft-keys-off

  • restore Tab, CapsLock, LeftShift
#!/bin/bash
hidutil property --set '{ "UserKeyMapping": [{ "HIDKeyboardModifierMappingSrc": 0x70000002B, "HIDKeyboardModifierMappingDst": 0x70000002B }, { "HIDKeyboardModifierMappingSrc": 0x700000039, "HIDKeyboardModifierMappingDst": 0x700000039 }, { "HIDKeyboardModifierMappingSrc": 0x7000000E1, "HIDKeyboardModifierMappingDst": 0x7000000E1 }] }'

For the curious, a slightly outdated pic of my Protoss control groups and abilities.

@bobo38
Copy link
Owner

bobo38 commented Dec 29, 2020

cool, thanks for sharing your tip ! I use similar trick on my Linux system (to transform CapsLock in a Left Control key). Nice to see there is something like that for MacOS

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

No branches or pull requests

3 participants