Backslash (\) not working as User-Defined Command Keyboard Shortcut

Things you’d like to miss in the future...
Post Reply
c0thirty
Posts: 23
Joined: 27 Oct 2021 14:28

Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by c0thirty »

Created new User-Defined Command, pressed Assign Keyboard Shortcut, and selected "\" (backslash) as the key from the list.
Pressing backslash in window, the command is not executed, instead the error text type ahead find ("\*"): no matching item names found appears in the status bar.

Backslash does work as a successful keybind for builtin commands however via Tools->Customize Keyboard Shortcuts.

admin
Site Admin
Posts: 60624
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by admin »

Cannot reproduce.

This may depend on your keyboard layout. Here in Germany the backslash is done with Ctrl+Alt+ß. How do you do it?

c0thirty
Posts: 23
Joined: 27 Oct 2021 14:28

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by c0thirty »

On a US layout keyboard, backslash is an unshifted key shared with the shifted pipe (|). Windows defines the virtual keycode as VK_OEM_5 (0xDC).

admin
Site Admin
Posts: 60624
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by admin »

Unshifted keys will go into type ahead find. I wonder why it works with builtin commands. It all goes thru the same hub. Are you sure?

c0thirty
Posts: 23
Joined: 27 Oct 2021 14:28

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by c0thirty »

Yes, just tried for the letter q and unshifted apostrophe, both work as keybinds for user-defined commands, but backslash doesn't.
In settings, "Enable type ahead find" is on.

Image
Image

admin
Site Admin
Posts: 60624
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by admin »

Got it. The US keyboard has two backslashes, 220 and 226:
VK_OEM_5 = 220 (&HDC) aka Backslash
VK_OEM102 = 226 (&HE2) aka OemBackslash aka IntlBackslash

The "All Free Shortcuts" dialog did not handle this merger correctly. Should be fixed in the next beta.

By the way, allow me to groan a little: Why, after 30 years of the WWW, is there still no backslash key on German keyboards? :blackstorm: Well, trains the hand muscles.

admin
Site Admin
Posts: 60624
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by admin »

Well, actually it's different. Although they look the same (\) these are two different keys and they can be assigned independently. So, you just have to scroll down a bit in the "All Free Shortcuts" dialog and you'll see another backslash. Take this one. Or you open Tools | Customize Keyboard Shortcuts... and just press the key you want. You can even assign both backslashes to the same function.

So there is nothing to fix here. :cup:

c0thirty
Posts: 23
Joined: 27 Oct 2021 14:28

Re: Backslash (\) not working as User-Defined Command Keyboard Shortcut

Post by c0thirty »

Ahh that did it. The one I was using showed up near the very end of the list, while the functioning one is a few pages above it. Thanks!

Post Reply