randyrants / sharpkeys

SharpKeys is a utility that manages a Registry key that allows Windows to remap one key to any other key.
http://www.randyrants.com/
Microsoft Public License
6.08k stars 408 forks source link

A key that sharpkeys doesn't know about #106

Closed kerhbal closed 6 years ago

kerhbal commented 6 years ago

Hi, I have a keyboard that replaces the function keys (F1, F2...) with some special keys. For F1's position particularly, it's a hot key to start web browser and open new page. When I input that key in sharpkeys, here comes the issure. image image Is there anything I can do? Thank you.

akai1831 commented 6 years ago

I've encountered this issue as well, by pressing Calculator button in a Numeric Keypad. We would need to remap the calculator button to different key. @randyrants

randyrants commented 6 years ago

Nothing to be done here: 00_100 is a common keycode that comes back from Windows when Windows doesn't know what key it is. It often means that the key is being interpretted by hardware, driver software, or some other intercepting code that prevents Windows from seeing the key pressed.

kerhbal commented 6 years ago

@randyrants So is there any work around? Because as I checked in the device manager in Windows, that bluetooth keyboard doesn't have its own driver software, still it can do the job mentioned before. That means at least my computer knows what's going on without any external help.

randyrants commented 6 years ago

Not that I know of: if an app on Windows can't get the scancode because it's transformed higher up, then there's nothing SharpKeys can do. You might want to try a more active remapper like AutoHotKeys .

kerhbal commented 6 years ago

@randyrants Thank you for recommendation

D-Hoff-DK commented 5 years ago

Hi guys, just wanted to bring this subject back up.. I was playing around with an Android BT keyboard on my Windows 10 tablet. All keys and the trackpad on the keyboard corresponded to the windows features except for "home" and "search" keys. When I press "home" on the Android keyboard my Win tablet opens the internet browser. The "search" key on the keyboard opens any search field available (on the desktop it opens a search in the start menu and in the browser it jumps to the search field at the top). When I try to remap the keys I get the (00_100) error.

My question is, how come the keys have a function but cannot be registered by SharpKeys/Windows?

Is there any program that can scan what code is sent by the input device?

I am thinking that since the buttons do work, they must be sending something that Windows understands. If that is true, I should be able to remap them as well 8-)

I would love to hear your comments on this.

randyrants commented 5 years ago

Same response as before: "00_100 is a common keycode that comes back from Windows when Windows doesn't know what key it is. It often means that the key is being interpretted by hardware, driver software, or some other intercepting code that prevents Windows from seeing the key pressed."

PioruneX commented 2 years ago

I have question... Whats escape key code? (Windows 10)

randyrants commented 2 years ago

You mean the scan code for Esc? 00_01

nasusonetrick commented 1 year ago

autohotkey says the scan code of "browers_home" is SC132 so how can we translate that to the Regedit key instead , i tried "32 e0" AKA ( E0_32 ) but it didn't do anything !

randyrants commented 1 year ago

I have no idea what SC132 is.

DreymaR commented 1 year ago

AutoHotKey operates with its own list of key names based on what Windows calls them.

For Scan Codes, it uses a shorthand where a key with a E0_## SC gets the AHK code SC1## (for any ## hex number). https://www.autohotkey.com/docs/v1/KeyList.htm

So AHK's SC132 is the SC E0_32 key, named "Browser/Home" or "Browser_Home". SharpKeys calls it "Web: Home". https://deskthority.net/wiki/Scancode

In conclusion, Nasusonetrick seems to have the right key. Problem is, the multimedia keys aren't always that well implemented?

randyrants commented 1 year ago

Ah, thanks - no idea why they'd shorthand that but OK. Anyway, it's equally as good because that's the same value SharpKeys uses: m_hashKeys.Add("E0_32", "Web: Home");

But, as DreymaR calls out, not every keyboard implements their "extra" keys the same way.

DreymaR commented 1 year ago

Their reason for it is probably just to keep things short and sweet. A typical AHK hotkey may look like this: #n::Run Notepad (Runs Notepad when you press Win+N) Whenever a key name is unclear or unavailable, its SC (or VK) value may be substituted: SC149::MsgBox, You just pressed PgUp

Of course this brevity may cause confusion once you step out of the AHK "kiddie pool" and into the world of real SC definitions.

randyrants commented 1 year ago

I guess? I mean, I don't know why you'd obsfucate it for the sake of... obsfucation? Like in this instance, SC149 tells you nothing - it's like you they made it SC-PGUP or something. I would have assumed this would be just as easy: E0_49::MsgBox, You just pressed PgUp.

Not my app. and they have active remapping technology, so they should keep doing whatever it is they are doing!

DreymaR commented 1 year ago

We who have used AHK for a while have gotten so used to it, we'd never see the problem I guess. To me SC1## looks every bit as logical as SCE0_##, and it's a bit easier on the eyes and the keyboard. As long as it's a 1 for E0 and a 0 for 00 and everybody knows that, it isn't really an obfuscation. Just a convention that many find handy.

If I were to make a suggestion, it'd be to make the scan codes one character longer and use SCE049 vs SC0049. But as there are a lot of inexperienced users of AHK, I guess every little complication will lead to user failure.

I see your quarrel with it, but it's easy to get used to and I never saw it as a problem myself.