[GH-ISSUE #23] Command shortcuts not displaying, ^A instead #22

Closed
opened 2026-05-05 04:44:22 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @aaronjensen on GitHub (Apr 19, 2015).
Original GitHub issue: https://github.com/keycastr/keycastr/issues/23

At least on OSX 10.10.3 #6 is happening again.

Originally created by @aaronjensen on GitHub (Apr 19, 2015). Original GitHub issue: https://github.com/keycastr/keycastr/issues/23 At least on OSX 10.10.3 #6 is happening again. ![](https://cloud.githubusercontent.com/assets/8588/7220805/eb269228-e689-11e4-9667-8efdf270bd4f.png)
Author
Owner

@aaronjensen commented on GitHub (Apr 19, 2015):

Not sure if it does, but this may fix it: https://github.com/creemama/keycastr/pull/1

<!-- gh-comment-id:94304760 --> @aaronjensen commented on GitHub (Apr 19, 2015): Not sure if it does, but this may fix it: https://github.com/creemama/keycastr/pull/1
Author
Owner

@akitchen commented on GitHub (Apr 19, 2015):

This is a strange one. @tjarratt and I have talked about it in person, but I use the app nearly daily in my work and have never run into it.

We will look into it more soon. Thanks!

On Sun, Apr 19, 2015 at 11:48 AM, Aaron Jensen notifications@github.com
wrote:

Not sure if it does, but this may fix it: https://github.com/creemama/keycastr/pull/1

Reply to this email directly or view it on GitHub:
https://github.com/keycastr/keycastr/issues/23#issuecomment-94304760

<!-- gh-comment-id:94310756 --> @akitchen commented on GitHub (Apr 19, 2015): This is a strange one. @tjarratt and I have talked about it in person, but I use the app nearly daily in my work and have never run into it. We will look into it more soon. Thanks! On Sun, Apr 19, 2015 at 11:48 AM, Aaron Jensen notifications@github.com wrote: > ## Not sure if it does, but this may fix it: https://github.com/creemama/keycastr/pull/1 > > Reply to this email directly or view it on GitHub: > https://github.com/keycastr/keycastr/issues/23#issuecomment-94304760
Author
Owner

@tjarratt commented on GitHub (Apr 19, 2015):

Interestingly enough, I too can reproduce this with the default visualizer. My proposed fix to creemama's fork looks silly to my eyes today, because it shouldn't have fixed anything. I'll look into it a bit more, maybe I've learned a thing or two in the past two years and will be able to fix it for good this time.

Thanks, @akitchen for pinging me to this thread!

<!-- gh-comment-id:94323833 --> @tjarratt commented on GitHub (Apr 19, 2015): Interestingly enough, I too can reproduce this with the default visualizer. My proposed fix to creemama's fork looks silly to my eyes today, because it shouldn't have fixed anything. I'll look into it a bit more, maybe I've learned a thing or two in the past two years and will be able to fix it for good this time. Thanks, @akitchen for pinging me to this thread!
Author
Owner

@tjarratt commented on GitHub (Apr 20, 2015):

The problem seems to stem from how we are creating the UTF8 encoded strings that represent the control keys. With a little debugging, I found that if I typed + A (for example), then the actual string that would be created was

`"⌘\x01A"

I tracked this down to where some constants are created that should be the proper unicode representation of command, control, option, etcetera.

KCKeystrokeTransformer.m
screen shot 2015-04-19 at 5 13 36 pm

Getting rid of those trailing \x01 fixes the bug for me, although I'm not certain at the moment why they are there in the first place.

<!-- gh-comment-id:94327468 --> @tjarratt commented on GitHub (Apr 20, 2015): The problem seems to stem from how we are creating the UTF8 encoded strings that represent the control keys. With a little debugging, I found that if I typed <kbd> ⌘ </kbd> + <kbd>A</kbd> (for example), then the actual string that would be created was `"⌘\x01A" I tracked this down to where some constants are created that should be the proper unicode representation of command, control, option, etcetera. KCKeystrokeTransformer.m ![screen shot 2015-04-19 at 5 13 36 pm](https://cloud.githubusercontent.com/assets/249262/7221985/7a3c80da-e6b7-11e4-9215-c9ca67de8e5b.png) Getting rid of those trailing `\x01` fixes the bug for me, although I'm not certain at the moment why they are there in the first place.
Author
Owner

@tjarratt commented on GitHub (Apr 20, 2015):

Seems like VLC at some point had some similar code, albeit without the trailing \x01.

I'd love to issue a pull request that fixes this, but I'm also really curious why this only fails on some machines.

<!-- gh-comment-id:94327872 --> @tjarratt commented on GitHub (Apr 20, 2015): Seems like [VLC](http://git.m2x.eu/videolan/vlc-2-2/commit/2ec4f0a67afd8b790415a591cc9872647ead7be7#9302b104ee2008fa6f012960db338325f5ed060d_226_213) at some point had some similar code, albeit without the trailing \x01. I'd love to issue a pull request that fixes this, but I'm also really curious why this only fails on _some_ machines.
Author
Owner

@tjarratt commented on GitHub (Apr 20, 2015):

I have a potential fix on a branch. Would love any feedback, suggestions, or explanations of the actual root cause here.

Perhaps you could try that out, @aaronjensen, and let me know if it works for you as well?

<!-- gh-comment-id:94355559 --> @tjarratt commented on GitHub (Apr 20, 2015): I have [a potential fix on a branch](https://github.com/tjarratt/keycastr/commit/4fcc59718cd74bce3262a90585c8edb118a414eb). Would love any feedback, suggestions, or explanations of the actual root cause here. Perhaps you could try that out, @aaronjensen, and let me know if it works for you as well?
Author
Owner

@aaronjensen commented on GitHub (Apr 20, 2015):

@tjarratt the fix works for me. I have no idea why it would work for some and not others before... odd.

<!-- gh-comment-id:94359462 --> @aaronjensen commented on GitHub (Apr 20, 2015): @tjarratt the fix works for me. I have no idea why it would work for some and not others before... odd.
Author
Owner

@akitchen commented on GitHub (May 7, 2015):

Please open a pull request with your fix @tjarratt ! Sounds like this would be helpful.

<!-- gh-comment-id:99715051 --> @akitchen commented on GitHub (May 7, 2015): Please open a pull request with your fix @tjarratt ! Sounds like this would be helpful.
Author
Owner

@akitchen commented on GitHub (May 16, 2015):

Please build and install from master for now, we will try to cut a new official release once we can update the version number in the UI / legacy nib #26

<!-- gh-comment-id:102664379 --> @akitchen commented on GitHub (May 16, 2015): Please build and install from master for now, we will try to cut a new official release once we can update the version number in the UI / legacy nib #26
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/keycastr#22
No description provided.