Jump to content

Keyboard remapping


31290
 Share

Recommended Posts

Hi There, 

I'm currently rebinding some of my keys (multimedia ones) and I have two keys that handle the Zoom (+ & -)

download.thumb.jpg.29e0df8a0ca699e8fc281 (just after the calc key)

 

I looked everywhere (in the help file and on Google) but I was not able to find the matching code.

Do some of you could have a little idea on how to get their "name" so I'll be able to remap them?

Thanks ;)

Edited by 31290

~~~ Doom Shall Never Die, Only The Players ~~~

Link to comment
Share on other sites

Use the WhatKeyIsPressed UDF to get the hex code of those keys and post them here.

WhatKeyIsPressed UDF can be found at

 

http://h--e.de/autoit/UDF/WhatKeyIsPressed.html

 

 

Edited by Exit
URL of UDF changed. Old Server is down.

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

Hi, 

Thanks all for your answers.

Unfortunately, I don't have access to this page here @ work and could someone download the UDF and copy/paste it's content here?

Thanks you :)

~~~ Doom Shall Never Die, Only The Players ~~~

Link to comment
Share on other sites

I can't reach it either but a forumsearch gives this post which is probably it.

@Exit

I think your server is down.

Yes, the Server seems to be down. But your link to the post is valid.

I will look for a new free Server to hold my sources. Any suggestions?

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

Unfortunately, I don't have access to this page here @ work and could someone download the UDF and copy/paste it's content here?

The Server is down. I migrated the Code to another Server:

http://h--e.de/autoit/UDF/WhatKeyIsPressed.html

Here the source:

;   WhatKeyIsPressed.au3      Author: Exit     http://www.autoitscript.com/forum/user/45639-exit/
#include <Misc.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$hDLL = DllOpen("user32.dll")
GUICreate("Press any key(s) to show hex key codes ", 315, 315, -1, -1, Default, $WS_EX_TOPMOST)
Opt("GUICloseOnESC", 0)
Local $a[16][16]
For $y = 0 To 15
	For $x = 0 To 15
		$a[$y][$x] = GUICtrlCreateLabel(Hex($y * 16 + $x, 2), $x * 20, $y * 20, -1, -1)
		GUICtrlSetState($a[$y][$x], $GUI_HIDE)
	Next
Next
$keydump = GUICtrlCreateEdit("", -50, 0, 0, 0)  ; Out of windows boundary. Will accept keystrokes.
GUISetState(@SW_SHOW)
While True
	If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
	For $y = 0 To 15
		For $x = 0 To 15
			GUICtrlSetState($a[$y][$x], (_IsPressed(Hex($y * 16 + $x, 2), $hDLL) ? $GUI_Show : $GUI_HIDE))
		Next
	Next
WEnd
DllClose($hDLL)

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

Hi There, 

I'm currently rebinding some of my keys (multimedia ones) and I have two keys that handle the Zoom (+ & -)

download.thumb.jpg.29e0df8a0ca699e8fc281 (just after the calc key)

 

I looked everywhere (in the help file and on Google) but I was not able to find the matching code.

Do some of you could have a little idea on how to get their "name" so I'll be able to remap them?

Thanks ;)

Perhaps this helps:

_HotKey("{ESC}")
_HotKey("{VOLUME_UP}")
_HotKey("{VOLUME_DOWN}")
Func _HotKey($hotkey = "")
;       ! ALT  + SHIFT  ^ CONTROL  # WinKey
    Switch @HotKeyPressed
        Case "{ESC}"
            Exit 0*MsgBox(64 + 262144, Default, "Exit", 1)
        Case "{VOLUME_UP}"
            MsgBox(64+262144, Default, "Volume Plus pressed",0)
        Case "{VOLUME_DOWN}"
            MsgBox(64+262144, Default, "Volume Minus pressed",0)
        Case Else
            If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed)
            If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.")
    EndSwitch
EndFunc   ;==>_HotKey

While Sleep(100)     ; here should be your application.
WEnd                 ; meanwhile, here is a dummy loop.

 

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
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
 Share

×
×
  • Create New...