| View previous topic :: View next topic |
| Author |
Message |
ricke
Joined: 14 Sep 2006 Posts: 31
|
Posted: Tue Sep 19, 2006 2:38 pm Post subject: Laptop extra buttons as hotkey? |
|
|
Hi
I got a dell XPS M170 laptop (think all dell inspiron has the same) with 7 extra buttons at the front for changing volume etc... but they are somehow hardcoded to work with WMP =( ...called dell and they say those buttons cant be used for anything else (but I found an addon for winamp that could use those buttons so it aint impossible hehe
But back to my question... is there anyway AutoHotKey can use those laptop "extra" keys as hotkeys ? |
|
| Back to top |
|
 |
vali
Joined: 19 Sep 2006 Posts: 23 Location: Munich
|
Posted: Tue Sep 19, 2006 3:28 pm Post subject: |
|
|
it would try the "window spy" to determine which event is sent to the system.
Vali |
|
| Back to top |
|
 |
TheLeO
Joined: 11 Jun 2005 Posts: 174 Location: England ish
|
Posted: Tue Sep 19, 2006 3:35 pm Post subject: |
|
|
I usually use the one in autohotkey it self,
so, double click on any autohotkey script in the tray menu, in the window go View> key history
press the button you want to know a couple of times and then press F5 to refresh, it shows the button attributies, inc the VK code and the SC code which can be used in autohotkey itself.
I use it for my key bord as well.. _________________ And i say: where there is a problem , there is a solution.(well some where that is.)
::
I Have Spoken
:: |
|
| Back to top |
|
 |
ricke
Joined: 14 Sep 2006 Posts: 31
|
Posted: Tue Sep 19, 2006 7:41 pm Post subject: |
|
|
Well they doesnt show up in Key History... but when I use "AutoscriptWriter II" and looks what happens when i press thoose 7 special buttons I get:
Send, 173
Send, 174
Send, 175
Send, 176
Send, 177
Send, 178
Send, 179
So that is what the buttons does I guess.... But how do I use that info to trigger an event ?
I know I can use stuf like
Numpad1::
#s::
or whatever... but [Send, 173] isnt really a key.... just something that happens when I press the button |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Thu Sep 21, 2006 12:21 pm Post subject: |
|
|
If these keys don't show up on the KeyHistory screen, there might be no easy solution. You might want to double-check that you're using KeyHistory correctly, such as ensuring that the keyboard hook is installed. The following single line script will do this, and you could then open it's KeyHistory screen via its tray icon:
#InstallKeybdHook ; Single-line script for use with Key History. |
|
| Back to top |
|
 |
ricke
Joined: 14 Sep 2006 Posts: 31
|
Posted: Thu Sep 21, 2006 12:52 pm Post subject: |
|
|
ok will try that later.
but I found out what they really did those seven buttons (173 for AD .... 179 for B3)
VK_VOLUME_MUTE (AD)
Windows 2000/XP: Volume Mute key
VK_VOLUME_DOWN (AE)
Windows 2000/XP: Volume Down key
VK_VOLUME_UP (AF)
Windows 2000/XP: Volume Up key
VK_MEDIA_NEXT_TRACK (B0)
Windows 2000/XP: Next Track key
VK_MEDIA_PREV_TRACK (B1)
Windows 2000/XP: Previous Track key
VK_MEDIA_STOP (B2)
Windows 2000/XP: Stop Media key
VK_MEDIA_PLAY_PAUSE (B3)
Windows 2000/XP: Play/Pause Media key
Btw is it possible (with a ahk's SEND command) to send for exampel "VK_VOLUME_MUTE" to the operating system ?
Or somehow listen for it and trigger events when ever it occurs? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Thu Sep 21, 2006 2:42 pm Post subject: |
|
|
| ricke wrote: | is it possible (with a ahk's SEND command) to send for exampel "VK_VOLUME_MUTE" to the operating system ?
Or somehow listen for it and trigger events when ever it occurs? | Yes. As a hotkey:
Volume_Mute::MsgBox You pressed Volume_Mute.
And to send it:
Send {Volume_Mute} |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Sep 22, 2006 7:47 am Post subject: |
|
|
Volume_Mute::MsgBox You pressed Volume_Mute.
Send {Volume_Mute}
------------------------
The above works for:
VOLUME_MUTE
VOLUME_DOWN
VOLUME_UP
But it doesn't work for those listed belove:
MEDIA_NEXT_TRACK
MEDIA_PREV_TRACK
MEDIA_STOP
MEDIA_PLAY_PAUSE
Is there any way to make the four media_* commands to work ? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Fri Sep 22, 2006 1:45 pm Post subject: |
|
|
| Quote: | But it doesn't work for those listed belove:
MEDIA_NEXT_TRACK
MEDIA_PREV_TRACK
MEDIA_STOP
MEDIA_PLAY_PAUSE | Other than the KeyHistory approach mentioned higher above, there's no other direct way. However, if your keyboard includes a utility or control panel applet, you might be able to use that to reprogram those buttons to send different keystrokes. Such keystrokes could then be made into hotkeys in the script. |
|
| Back to top |
|
 |
yellowsix
Joined: 17 Nov 2006 Posts: 6
|
Posted: Wed Nov 22, 2006 9:09 am Post subject: |
|
|
Doesn't every key have it's own virtual key code?
Maybe someone knows a way to get the keycode of the pressed key.
In that case you could use the key-codes instead of the standard keys. |
|
| Back to top |
|
 |
stormlifter
Joined: 13 May 2007 Posts: 1
|
Posted: Sun May 13, 2007 6:21 pm Post subject: |
|
|
Wait, so did anyone find out how to use dell keys for volume control? I'd love to have them control my volume, cause I don't use the windows shell I don't have anything to bind them.
Let me know. I'd love it! |
|
| Back to top |
|
 |
ricke
Joined: 14 Sep 2006 Posts: 31
|
Posted: Wed May 16, 2007 2:35 pm Post subject: |
|
|
This binds the extra keys on the XPS M170.... might be the same for other dell laptops (not tested)....
| Code: |
#InstallKeybdHook ; Single-line script for use with Key History.
vkADsc120::msgbox, Pressed Mute
vkAEsc12E::msgbox, Pressed Volume Down
vkAFsc130::msgbox, Pressed Volume Up
vkB3sc122::msgbox, Pressed Play/Pause
vkB1sc110::msgbox, Pressed Reverse
vkB0sc119::msgbox, Pressed Forward
vkB2sc124::msgbox, Pressed Stop
|
I'm using this to control winamp
| Code: |
#NoEnv
SendMode Input
#include winamp.ahk
; TnX to jballi !
; Found at forum ---> http://www.autohotkey.com/forum/viewtopic.php?t=8222
; direct download ---> http://autohotkey.net/~jballi/Winamp/v1.0/Winamp.ahk
BOOL_MUTE:=1
vkADsc120::
SoundSet, %BOOL_MUTE%, Master, Mute
BOOL_MUTE:=NOT(BOOL_MUTE)
return
vkAEsc12E::Winamp("VolumeDown")
vkAFsc130::Winamp("VolumeUp")
vkB3sc122::Winamp("Pause")
^vkB3sc122::Winamp("Play")
+vkB3sc122::Run, C:\Program Files\Winamp\Winamp.exe
vkB1sc110::Winamp("PreviousTrack")
^vkB1sc110::Winamp("FastRewind")
vkB0sc119::Winamp("NextTrack")
^vkB0sc119::Winamp("FastForward")
vkB2sc124::Winamp("FadeoutStop")
^vkB2sc124::Winamp("Exit")
|
|
|
| Back to top |
|
 |
|