Reverse Engineering Team Board

Reverse Engineering Team Board (http://www.reteam.org/board/index.php)
-   Reverse Code Engineering (http://www.reteam.org/board/forumdisplay.php?f=23)
-   -   Remapping "impossible" keyboard keys... (http://www.reteam.org/board/showthread.php?t=206)

primse 02-05-2005 08:11 PM

Remapping "impossible" keyboard keys...
 
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 :)

sna 02-06-2005 03:51 PM

Remapping "impossible" keyboard keys
 
Starting with Windows 2000, Windows has built-in support for remapping keys:
http://www.microsoft.com/whdc/device/input...2kscan-map.mspx

Quote:

...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

Will 02-12-2005 11:11 PM

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


All times are GMT -4. The time now is 11:44 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.