View Full Version : Remapping "impossible" keyboard keys...
primse
02-05-2005, 08:11 PM
Well, here's the story. I recently bought a new laptop and i'm rather happy with it, except for one thing. The Fn-key is seriously badly misplaced like on many other laptops (Toshiba/IBM/Compaq/Fujitsu-Siemens you name it..). What i want to do is to "remap" the Fn-key with the CTRL-key, yet this seems impossible to do because this so-called function key does not send an ID-number like 99% of all other keys to the Operating system. I've tried lots of apps out there trying to change the function of the key, yet all have failed!
Would be a neat project for RET to code some sort of virtual driver to change this key and maybe 3-4 other impossible keys. Though this seems nearly impossible because all vendors seem to have their own "scheme" for mapping those special keys.
I hope you understand what i mean :)
Starting with Windows 2000, Windows has built-in support for remapping keys:
http://www.microsoft.com/whdc/device/input...2kscan-map.mspx (http://www.microsoft.com/whdc/device/input/w2kscan-map.mspx)
...yet this seems impossible to do because this so-called function key does not send an ID-number...
If it didn't it would be a dead key. I'm sure the hardware generates some sort of event but the keyboard driver might chose not to propagate it. In that case you'll probably be forced to write your own filtering/remapping keyboard driver and install it on top of the existing one.
I have no experience working with these thing but perhaps someone else on this board does?
Regards, sna
You could write a little app that sets a keyboard hook (WH_KEYBOARD_LL) and when the substitute key is pressed, do a PostMessage w/ WM_KEYUP or whatever. You'd have to give up another key for it though, or use alt+the other key.
Like sna suggested different windows releases may have built in support for mapping keys but I've never used any of them.
At work awhile back I had one of those new fangled internet keyboards with an extra row of buttons that launched IE, raised the volume, etc. There wasn't any built in support for changing the function of the keys though so I coded a little keyboard hook dll and app. Everything was hardcoded. I did intend to add an i/f to change the function of the keys but I never got around to it because I hardcoded everything that I needed into it. If you'd like it I'll find the source and upload it. It wouldn't be too hard to add the code to 'train' it, storing the keydata in some external config file or something.
later,
will
vBulletin® v3.6.4, Copyright ©2000-2016, Jelsoft Enterprises Ltd.