Sign in to follow this  
Followers 0
rudi

mostly OT: Keyboard ScanCode table needed.

7 posts in this topic

#1 ·  Posted (edited)

Hi.

I'd like to write an Autoit Script allowing to remap keyboard keys.

By Google I did this some 3 years ago, but I desperately fail to figure out the codes for "Ctrl+K" and "Pause" ;)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
;                  00,00,00,00,00,00,00,00 Header
;                                         ,03,00,00,00 three entries including trailing teminator
;                                                      00,0F, = Ctrl+o
;                                                            00,D8, = Ø
;                                                                  00,1D, = Ctrl+] (+ on german keyboard)
;                                                                        00,B1, = ±
;                                                                              00,00,00,00 (terminator)
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,0F,00,D8,00,1D,00,B1,00,00,00,00

The result of this registry keys is, that pressing "Ctrl+]" gives you "Ø" (you can get this by typing "0216" in the numpad while you press down the <ALT> key, 0xD8 = 0216, and 0xB1=0177="±".)

I currently can't figure out the codes for "CTRL+k" and "<PAUSE>", to be able to make the <PAUSE> key to generate a "CTRL+k" in stead.

Frustrated, as the last time took me some 15 minutes, and I better don't tell how much time I've spoiled up to now to do exactly the same again :)

In case <PAUSE> should be one of the keys, that cannot be remapped due to the Windows API (iirc <F12> is such a key), then <ROLL> would be nice as well.

Any suggestion to point me to some "Keyboard-Key-to-ScanCode-Translator" would be mostly appreciated.

BTW: The microsoft keyboard design layout tool doesn't help here: it just allows to remap keys in the "typewriter" part of the keyboard, I need to remap the <PAUSE> key, which is out of this range, unfortunately.

Regards, Rudi.

[edit: typo]

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites



is something like this what you are trying to do?

HotKeySet("{PAUSE}","_MyFunc")

While 1
    Sleep(10)
WEnd

Func _MyFunc()
    Send("^k")
EndFunc

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi.

No, the autoit script is just mentioned to enable the users, to activate / deactivate that keyboard remapping.

In the old version of the ERP system the "<PAUSE>" key was used to open TIFF images (CAD paper).

In the new ERP it's "CTRL+k", that has to be pressed for the same action.

Therefore I want to remap the "<PAUSE>" key to "produce" a "CTRL+k", so that they can continue to press "<PAUSE>", that's all.

But I desperately fail to get the scan code of "<PAUSE>".

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

rudi,

I want to remap the "<PAUSE>" key to "produce" a "CTRL+k"

Why does kaotkbliss' HotKey suggestion not meet the bill? Pressing "PAUSE" will send "Ctrl-k", which is what you say you want. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Hi rudi

I found the following

The keys PrtSc/SysRq and Pause/Break are special. The former produces scancode e0 2a e0 37

when no modifier key is pressed simultaneously, e0 37 together with Shift or Ctrl, but 54

together with (left or right) Alt. (And one gets the expected sequences upon release. But see below.)

The latter produces scancode sequence e1 1d 45 e1 9d c5 when pressed (without modifier) and

nothing at all upon release. However, together with (left or right) Ctrl, one gets e0 46 e0 c6,

and again nothing at release. It does not repeat.

at this site (quote is from "1.1. Key Release")

hope that helps,

whim

Share this post


Link to post
Share on other sites

Hi.

Thanks for that URL, I'll figure out something useful from that input.

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

If you search Google Images for keyboard scan codes you'll find several images of keyboards with the scan codes besides them and their escape sequence. Here's one of the nicer ones (I think) http://www.siongboon.com/projects/2007-12-08_ascii_code/keyboard%20scan%20code.gif

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  
Followers 0