hotkey icon indicating copy to clipboard operation
hotkey copied to clipboard

The / hotkey does not work

Open Artur- opened this issue 2 years ago • 11 comments

In the readme there is

<a href="/search" data-hotkey="s,/">Search</a>

the same code is used in the GitHub toolbar that says "Type / to search".

The problem is that pressing / (shift + 7 on a finnish keyboard) does not trigger the search. It does nothing. Pressing "s" does trigger it.

Artur- avatar Jun 27 '23 13:06 Artur-

For shortcuts like these to work, you must have "Character keys" enabled within the accessibility options within your GitHub settings. Please also make sure you're not using a browser extension that might override these, such as vim-mode extensions.

a screenshot of the accessibility section in GitHub settings. It shows the title "Accessibility", the subtitle "Keyboard Shortcuts" followed by the subheading "General". There is a checkbox labelled "Character Keys" which has been checked. The description for Character keys says "Enable GitHub shortcuts that don't use modifier keys in their activation. For example, the g n shortcut to navigate notifications, or question mark ? to view context relevant shortcuts. Learn more about character key shortcuts."

keithamus avatar Jun 27 '23 13:06 keithamus

Uh... so to use the shortcut mentioned by default on the frontpage of all repositories in GitHub, I must configure something?

Artur- avatar Jun 27 '23 13:06 Artur-

Seems like they are enabled by default though image

Artur- avatar Jun 27 '23 13:06 Artur-

Removing all extension make no difference either

Artur- avatar Jun 27 '23 13:06 Artur-

Uh... so to use the shortcut mentioned by default on the frontpage of all repositories in GitHub, I must configure something?

The option is enabled by default.

Could you please visit https://www.toptal.com/developers/keycode and press the / key, and take a screenshot of the values that come back. Thank you.

keithamus avatar Jun 27 '23 13:06 keithamus

image

Artur- avatar Jun 27 '23 14:06 Artur-

Hi, I can confirm that the same code is true on the German keyboard.

It's super awesome that the icon is visually present to support learnability, but I tried so often, and it never worked. It's a bit disappointing. Hope I can also help to get this to work.

Yes, accessibility option is enabled.

formspiel avatar Jul 22 '23 09:07 formspiel

Can you please visit this page: https://github.github.io/hotkey/examples/hotkey_mapper.html and, once loaded, tap the desired key and report back with a screenshot - and perhaps copy the code? Thanks.

keithamus avatar Jul 22 '23 09:07 keithamus

To achieve "/" on a German keyboard, I've to press "shift" and "7" The Hotkey Mapper output is: Shift+/

image

formspiel avatar Jul 22 '23 09:07 formspiel

shift seems like a problematic hotkey target. here's some results from the mapper on my mac en-US keyboard:

  • Shift + a = Shift+A
  • caps lock enabled; a = A
  • caps lock enabled; Shift + a = Shift+A (IIRC on windows, caps lock + shift will result in lowercase? if that's still true then Shift+a is possible)

obviously caps lock is an edge case, but it exemplifies the problem that the keyboard event key and shift aren't much related.

github.com should have the same problem as OP for me with the ? hotkey since that results in "Shift+?" in the mapper, but i'm guessing that hotkey is handled differently.

looking through the vscode keyboard shortcuts, i don't see any using shift and i'd bet this is why.

cmawhorter avatar Aug 03 '24 16:08 cmawhorter