cyanidemonkey Posted March 11, 2015 Posted March 11, 2015 I have an nice old Sun Micro Systems N-107 keyboard and I would like to use it on my PC. I hooks up via the PS/2 plug and most keys work, it is just that some of the mapping is not correct for Windows. Before I look into registry modification, Is it possible to remap using autoit? something like the hotkeys.au3 so that the keys that are missed matched can send the correct value? I am not interested in keylogging or any of that stuff, just a way to use my cool old keyboard. My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator
Moderators JLogan3o13 Posted March 11, 2015 Moderators Posted March 11, 2015 Yes, there are a number of ways to do it: Below are just two: Using HotKeySet HotKeySet("{F1}", "_pressB") HotKeySet("{F10}", "_pressC") While 1 Sleep(100) WEnd Func _pressB() Send("b") EndFunc Func _pressC() Send("C") EndFunc Using _IsPressed #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("70", $hDLL) Then Send("b") ElseIf _IsPressed("79", $hDLL) Then Send("C") EndIf WEnd The _IsPressed method, however, will usually send several strokes at a time. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
cyanidemonkey Posted March 11, 2015 Author Posted March 11, 2015 (edited) Cool, thanks for the help, I will read up the help docs on those methods. I found the N-107 key codes on a website about the keyboard so I think I can use the numbers from _IsPressed() I know there are proably other ways of doing it, but I prefer a simple app to run in the background, so if I ditch the keyboard I can just remove the app and no registry changes are required. This is for the PC at work and I don't want to monkey about with it too much, but I just hate the nasty cheap clacker I am typing with right now but because I am software testing I need to quickly take it out of the workflow if I get an issue with our software. Edited March 11, 2015 by cyanidemonkey My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now