jaywcjlove / react-hotkeys

React component to listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts.

Home Page:https://jaywcjlove.github.io/react-hotkeys/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not handling `?` character

camd opened this issue · comments

I tried the following in my keyName property:

?,shift+?,shift+slash

These keys go through my filter like so:

keydown Shift { target: span.th-view-content, key: "?", charCode: 0, keyCode: 191 }

But it does NOT go through my onKeyDown function. Is there any way to get ? to work?

Thanks! Great library!

Hi, I got the same issue with you, I think react-hot-keys still not support "?" So do you have any fix that work?

@camd @qingbolove thx! Let me check what the problem is.

Thanks for the quick response, I am counting on this component to do my feature:)

@jaywcjlove 童鞋你好 我的項目大概月底就要上綫,你這個問題麻煩嗎,之前可以改好嗎,謝謝~

@qingbolove @camd react-hot-keys@2.6.0 Looks ok...

Example Test: https://jaywcjlove.github.io/react-hotkeys/

@jaywcjlove hi, it seems still do not react to "?" or "shift+?", I am using windows 10 laptop, it do not work on my project and do you work on your codesandbox demo as well. Could you pls double check? Thanks so much!

shift+? = shift+/ ? and / are on the same key.

@jaywcjlove exactly, I should use keyName as "shift+/", thanks so much! Very helpful!

Thanks! Yep, that was my problem. That works well. I should have thought of that... :)