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

Command key is not being registered (affected: cmd, opt, fn, ctrl, shift, capslock) #8

Open
mvoropaiev opened this issue Aug 9, 2018 · 36 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mvoropaiev
Copy link

Hello,
I think I have a a "double key press" issue with left command key,
I have tried both latest (2.2.0) and 1.1.0 versions, but the command key is not showing in debug window, neither an issue was mitigated.
Is there something I am missing?
Thanks!

@aahung aahung closed this as completed Aug 10, 2018
@aahung aahung added the bug Something isn't working label Aug 10, 2018
@aahung
Copy link
Owner

aahung commented Aug 10, 2018

Wait a minute. Why you care about command key? Double press does not seem affect the functions of them. Since the their states (Up/Down) instead of press count matter.

@aahung aahung reopened this Aug 10, 2018
@aahung aahung added the invalid This doesn't seem right label Aug 10, 2018
@mvoropaiev
Copy link
Author

@aahung the thing with command key in my case is that while it's being "double pressed" (as I believe it is), switching between windows with cmd+tab becomes very hard due to key being "released" for short time before "second press" which results in auto switch to next window instead continuing showing the switch menu with ability to press tab key to select another window.

@mvoropaiev
Copy link
Author

Another example is trying to cmd+c/cmd+v in text editor, hitting c/v keys while holding command key sometimes result in those letters being typed instead of copying or pasting the text.

@aahung
Copy link
Owner

aahung commented Aug 10, 2018

Oh I think I got what you mean. However, how Unshaky works is to block the subsequent key press. Today I tried to implement the command blocking, when I hold command, typing c actually types c. So I am afraid it is not what we want.

@mvoropaiev
Copy link
Author

Here is an example video that shows that latest cmd press (6 second onwards) result in it being registered as double click.
But yeah, I see that the way Unshaky works will not help in my case :(

@aahung
Copy link
Owner

aahung commented Aug 10, 2018

I will put a new feature in the future plan:

When modifier key is released, Unshaky will hold it, until no immediate press is registered.

Not sure if it is a solution to your case.

@mvoropaiev
Copy link
Author

@aahung sound good! Thank you!

@aahung
Copy link
Owner

aahung commented Aug 11, 2018

Not sure how practical it is.

@aahung aahung removed the invalid This doesn't seem right label Aug 11, 2018
@aahung aahung changed the title Command key is not being registered Command key is not being registered (affected: cmd, opt, fn, ctrl, capslock) Aug 11, 2018
@mvoropaiev
Copy link
Author

mvoropaiev commented Aug 13, 2018

After taking of the key for n time in attempt to clean it, I have managed to broke one of four "pins" on butterfly mechanism that are holding it, and after putting the key back with just three of them, voila, the issue with "double press" was not reproduced for the whole working day (was spraying with compressed air and tried to clean it many-many times before), fixing issues the hard way (don't repeat yourself, hah) 🤷‍♂️
@aahung while it seems no more relevant to me, well, I do really hope so, the solution might still be helpful for those having the same issue with modifier keys.
Anyway, thank you for this application!

@aahung
Copy link
Owner

aahung commented Aug 16, 2018

@mvoropaiev

Glad you fixed your keyboard! For me, I tried similar methods without luck, and ended up replacing it. :-(

@cperezabo
Copy link

@mvoropaiev

Glad you fixed your keyboard! For me, I tried similar methods without luck, and ended up replacing it. :-(

Are you saying that neither Unshaky couldn't solve the problem?

@aahung
Copy link
Owner

aahung commented Feb 10, 2019

@cperezabo what I meant was I tried "spraying with compressed air".

Can you also open the debug windows, reproducing the problem and post the debug log?

@aahung
Copy link
Owner

aahung commented Feb 10, 2019

@cperezabo besides, can you open a new issue for this? since this thread is about command key.

@cperezabo
Copy link

I was just doing this before you suggested me, that's why I edited my original comment. 👍🏻

@mvoropaiev
Copy link
Author

mvoropaiev commented Feb 10, 2019

Just a tip (use it at you own risk), which for now keeps helping me with this issue (both cmd keys and others), is to just gently take of the key (youtube how to do it), get a toothbrush or something similar and a vacuum cleaner, start with a toothbrush by cleaning the key base and point a vacuum cleaner from different directions using something like medium power setting (do it carefully), repeat until fixed, had much better luck with this method than with the compressed air one.
Crazy I need to do something like that on laptop with that price, hah, but.. have nothing else to do :(
Hope this helps someone.
Cheers!

@cperezabo
Copy link

This is my third Mac (13" 2010, 15" Retina 2013, and this one 15" 2017), I am going to have a forth one (next generation), macOS is simply unbeatable, and the 98% of the product is a dream.. BUT..... I cannot believe we have to deal with these stupid hardware bugs, being Apple a company with an inmense experience building Mac products and furthermore taking into account the price.

@mvoropaiev I was going to try the scotch tape method presented here but I haven't get a credit card or something that thin to remove the key, so I have the same problem to try your method

@felixbuenemann
Copy link

felixbuenemann commented Feb 28, 2019

I have the problem that while Unshaky is running, pressing Cmd+Space simultaneously is not registered. But pressing Cmd first, keeping it pressed and then pressing Space works, as long as the "Fix if CMD+SPACE not work" option is set.

This is a problem, since I often use left thumb and left index finger to press cmd+space with only the left hand.

(I have the 2018 15" i9 MBP from December 2018, Spacebar Delay set to 40ms.)

@aahung
Copy link
Owner

aahung commented Feb 28, 2019

@felixbuenemann Should have something to do with #1, can you post your debug window content for both scenarios in #1 instead of here? (Also please add some delay (none-zero) for left CMD so that it will be captured by the debug window)

Edit: please use v0.4.2 instead since it display more information in the debug window related to command key.

@aahung aahung changed the title Command key is not being registered (affected: cmd, opt, fn, ctrl, capslock) Command key is not being registered (affected: cmd, opt, fn, ctrl, shift, capslock) Apr 2, 2019
@aahung
Copy link
Owner

aahung commented Apr 2, 2019

I just thought about debouncing modifier keys.

Let's use "a" key and "CMD" key as examples, and they both register twice when pressed once.

The expected behavior of "a" is only to produce one "a" signal, so Unshaky can simply kill the second registration.

The expected behavior of "CMD" however, is to keep "held" state for the entire press, and killing the second registration cannot solve the problem. Another solution prior mentioned here is for "CMD" key, Unshaky holds it for 50ms when it detect CMD has been released, and actually release it when there is no "CMD" press. So each "CMD" hold will be longer than normal hold, and I worry that it can be an issue.

@balazspekarcc
Copy link

I'm just here to upvote to add "Shifts" to Unshaky. I'm a frontend developer and using IntelliJ/Webstorm heavily on a daily basis and double shift press opens up the quickswitch panel - which I'm pretty sure can be mapped to another key, but hey, good habits never die, right :)
So yeah, registering the Shift twice can cause this problem that the quickswitcher opens even when I don't want it to. And boy, it's annoying... so yeah, thanks, Apple. Thank you for this app, though, fantastic 👍

@ShadowJoker
Copy link

ShadowJoker commented Jun 26, 2019

I’m hoping to add "Shift" to Unshaky +1
I'm a Chinese developer. For me and many chinese developer, "Shift" is a convenience way to switch between English input mode and Chinese input mode.
When the "Shift" double click happened, something weird will happen. For example, when I want to input a capital letter "A", I press "Shift+A", but shift double click make me switch to the Chinese input first, and then input a Chinese A ("啊"). Another example, when I want to switch to Chinese input mode. I press shift, but it double click, that make me switch back to English input again.
It's really an annoying problem. I’m hoping to add "Shift" to Unshaky, thanks a lot!Unshaky is the best solution for "double click problem" I have ever seen.

@aahung
Copy link
Owner

aahung commented Jun 26, 2019

@ShadowJoker supporting modifier keys requires fundamental changes to how Unshaky works.

  • From: only dismiss subsequent key presses.
  • To: postpone all key-up events and only release when there is no follow-up key-down

I need to figure out a way to implement this with minimal CPU usage.

@AliLozano
Copy link

Someone have tried karabiner for this?.

I have this:

{
                        "description": "Command Fix",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "left_command",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to_if_alone": [],
                                "to": [
                                    {
                                        "key_code": "right_command",
                                        "hold_down_milliseconds": 500,
                                        "lazy": true
                                    }
                                ],
                                "parameters": {
                                    "basic.to_if_alone_timeout_milliseconds": 500
                                },
                                "type": "basic"
                            }
                        ]
                    }

@aahung
Copy link
Owner

aahung commented Feb 22, 2020

@AliLozano looks like a great fix, does it work?

@AliLozano
Copy link

Yes, It works. :)

@samudurand
Copy link

Any progress to get that achieved with only unshaky ? it's a great tool and it works fine, except that on Intellij the double shift is an essential shortcut to open the search box. So at the moment I am getting the search box opened all the time when typing. I worked around that by changing the shortcut but it would be a great addition

@aahung
Copy link
Owner

aahung commented Apr 23, 2020

@samudurand thanks for checking here. I am afraid I don't have plan to implement it yet... With how Unshaky works right now (cancel subsequent presses), "holding shift" key would be very much broken.

@YukunXia
Copy link

I’m hoping to add "Shift" to Unshaky +1
I'm a Chinese developer. For me and many chinese developer, "Shift" is a convenience way to switch between English input mode and Chinese input mode.
When the "Shift" double click happened, something weird will happen. For example, when I want to input a capital letter "A", I press "Shift+A", but shift double click make me switch to the Chinese input first, and then input a Chinese A ("啊"). Another example, when I want to switch to Chinese input mode. I press shift, but it double click, that make me switch back to English input again.
It's really an annoying problem. I’m hoping to add "Shift" to Unshaky, thanks a lot!Unshaky is the best solution for "double click problem" I have ever seen.

The left shift button on my keyboard recently keeps double-clicking. Really need this shift feature, because it's quarantine time, and I couldn't go out now to fix it physically... Thanks!

@gerasimvol
Copy link

I successfully fixed delete and return keys with unshaky, but I also need left command
I beg you, please add support for it

@setanarut
Copy link
Contributor

setanarut commented Jul 17, 2020

I successfully fixed delete and return keys with unshaky, but I also need left command
I beg you, please add support for it

I think it is not possible to fix modifier keys using software.

The left command key is also shaky for me. I disassembled it twice, the problem did not go away. sometimes decreasing, sometimes increasing. I realized that the temperature affects the problem. When the computer gets too hot, it gets better when the key is massaged.

o

@sam1rm
Copy link

sam1rm commented Dec 3, 2020

Confirming that both the CMD left + right key is having the double press issue on my macbook retina 15' 2017.

@cong1223
Copy link

I’m hoping to add "Shift" to Unshaky +1!!!!!!its helpful to developers, so important for us,thank u very much!!

@cong1223
Copy link

Wait a minute. Why you care about command key? Double press does not seem affect the functions of them. Since the their states (Up/Down) instead of press count matter.

because its helpful to developers,ideas tools have many keymaps used by 'shift' or double 'shilft', i hope unshaky can add 'shift' to unshaky next version

@TheAmbos
Copy link

Another example is trying to cmd+c/cmd+v in text editor, hitting c/v keys while holding command key sometimes result in those letters being typed instead of copying or pasting the text.

Same for me. Its very frustrating :(

@setanarut
Copy link
Contributor

Another example is trying to cmd+c/cmd+v in text editor, hitting c/v keys while holding command key sometimes result in those letters being typed instead of copying or pasting the text.

Same for me. Its very frustrating :(

disassembling and cleaning the keys, sometimes blowing and massaging helps. but I can't guarantee. it worked for me.

@adufeng
Copy link

adufeng commented Oct 8, 2022

please add "Shift" to Unshaky, thank u very much!!thank u very much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests