rudi 32 Posted October 4, 2010 (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 October 4, 2010 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Share this post Link to post Share on other sites
kaotkbliss 146 Posted October 4, 2010 is something like this what you are trying to do? HotKeySet("{PAUSE}","_MyFunc") While 1 Sleep(10) WEnd Func _MyFunc() Send("^k") EndFunc 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
rudi 32 Posted October 5, 2010 (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 October 5, 2010 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Share this post Link to post Share on other sites
Melba23 3,456 Posted October 5, 2010 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Share this post Link to post Share on other sites
whim 1 Posted October 5, 2010 Hi rudiI found the followingThe 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
rudi 32 Posted October 11, 2010 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
jvanegmond 306 Posted October 11, 2010 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 github.com/jvanegmond Share this post Link to post Share on other sites