blah blah blah is here! blah blah » Close

358 views

remap keys

up0down
link

hello i have search a long time fro keyboard keys remapping! i have found the scancodemap in registry! and works fine! but this way needs to restart the PC so the remapping apply!

a know some market programs can apply scan code maps directly without restart!

can anyone have some idea for this??

thanks

last answered one year ago

2 answers

up1down
link

If they're doing it without a reboot, then I'd imagine they must be using a global keyboard hook to intercept every keystroke and replace it with the mapped key (see for example this article).

But, doing it this way, is certainly going to slow down the system.

lios
30

this application is a cyder cafe software and with this part i wand to lock the keyboard but to leave the numpad so the user to enter a personal 8digit code, the global keyboard hook works even if the user runs a video game?? i thing the games create global hook in the keyboard?

vulpes
17279

Yes, there's a good chance that a video game will be using hooks of some description. Even if it's using the same type of hook, your application may still work if the game calls the API function CallNextHookEx() which chains to the next hook procedure. However, full screen games may assume that they're the only application running and not bother to call this function in which case your hook won't work unless it's installed before the game starts.

lios
30

ok vulpes many thanks

Thanks vulpes...I was looking for an article like that about a month ago...search pages and pages in google and couldn't find it...back then was experimenting with intercepting keyboard inputs. if they match my rules I would Output something specific.

Feedback