Jump to content
Sign in to follow this  
cyanidemonkey

Keyboard remapping? Sun kb on Win PC.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by cyanidemonkey

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...