leuce Posted July 21, 2011 Share Posted July 21, 2011 G'day everyone Background: I have a new laptop with a slightly weird keyboard layout, and I would like to remap a few keys. Specifically, the left Shift key is halfsized and has a pipe+backslash key next to it (which I want to remap to Shift). Also, there are *two* identical pipe+backslash keys on the keyboard (one next to Shift, and one next to Enter), and I'm hoping that I would be able to remap them individually (to two different functions). Finally, the spacebar is really small, and I hope to remap the AltGr to space so as to extend the space bar a bit. Need: I need to find out what is the key code for the keys that I want to remap. Is there a way to find out what the key code of a key is when I press the key, without turning the question into a keylogger question? I used to be able to do this but I can't remember how (and I didn't save that script). Thanks Samuel (leuce) Link to comment Share on other sites More sharing options...
JohnOne Posted July 21, 2011 Share Posted July 21, 2011 What type of keyboard is it? sometimes you can get the info on their keycodes in a google search. Would make your coding a lot easier and quicker. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Avariean Posted July 21, 2011 Share Posted July 21, 2011 MSDN can usually prove helpful in cases like these.A stupidly simple way just to figure it out, however, exists within Misc.au3:#Include <Misc.au3> While 1 For $i = 0 To 400 ;Arbitrary random number If _IsPressed(Hex($i)) Then MsgBox(0,0,$i & " " & Hex($i)) Next Sleep(100) Wend Link to comment Share on other sites More sharing options...
leuce Posted July 21, 2011 Author Share Posted July 21, 2011 What type of keyboard is it? Sometimes you can get the info on their keycodes in a google search. Would make your coding a lot easier and quicker.Thanks for the response. Actually, I figured out that AHK might do a better job of remapping, and then I discovered that AHK has a keypress history function that was really useful. It turned out that the two identically looking keys have different codes, so I was able to remap the one next to the Shift key to function as an extension of the Shift key, using AHK. Link to comment Share on other sites More sharing options...
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