thinkstorm wrote:
Can someone with a US keyboard send me the VK code that is sent whhen pressing "[" and "]"? Maybe that helps.
If you mean a vk code when pressing both key simultaneously, there is none.
If you mean of those keys themselves, then here are 4 press & releases of each key. Along with some window switching.
Code:
Window: C:\Users\Leef_me\Documents\Autohotkey\key_history.ahk - AutoHotkey v1.0.48.05
Keybd hook: yes
Mouse hook: yes
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 0 (0 layers)
Modifiers (GetKeyState() now) =
Modifiers (Hook's Logical) =
Modifiers (Hook's Physical) =
Prefix key is down: no
NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script. The same method can be used to change the size of the history buffer. For example: #KeyHistory 100 (Default is 40, Max is 500)
The oldest are listed first. VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event. Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist.
VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
0D 01C d 1.98 Enter key_history.ahk
0D 01C u 0.11 Enter C:\Users\Leef_\Documents\Autohotkey\key_history.ahk - AutoHotkey v1.0.48.05
A4 038 d 0.48 Alt
09 00F d 0.09 Tab
09 00F u 0.22 Tab Task Switching
09 00F d 0.22 Tab
09 00F u 0.16 Tab
A4 038 u 0.73 Alt
DB 01A d 1.50 [ Document1 - Microsoft Word
DB 01A u 0.09 [
DB 01A d 0.13 [
DB 01A u 0.08 [
DB 01A d 0.34 [
DB 01A u 0.13 [
DB 01A d 0.17 [
DB 01A u 0.12 [
DD 01B d 0.81 ]
DD 01B u 0.14 ]
DD 01B d 0.11 ]
DD 01B u 0.13 ]
DD 01B d 0.13 ]
DD 01B u 0.11 ]
DD 01B d 0.30 ]
DD 01B u 0.13 ]
A4 038 d 0.77 Alt
09 00F d 0.20 Tab
09 00F u 0.19 Tab Task Switching
A4 038 u 0.73 Alt
74 03F d 1.22 F5 C:\Users\Leef_me\Documents\Autohotkey\key_history.ahk - AutoHotkey v1.0.48.05
Press [F5] to refresh.
In addition, I recorded the following actions:
1. open a script with key_history being used
2. alt-tab to msWord and type this (all lower case)
3. control-shift= several times to increase font size
4. control-shift- several times to decrease font size
5. control ] several times to increase font size
6. control [ several times to decrease font size
7. alt-tab back to the keyhistory script
8. F5 to update the key_history window
9. F1 (not shown) to save the key_history window to the clipboard
Code:
Window: C:\Users\Leef_me\Documents\Autohotkey\key_history.ahk - AutoHotkey v1.0.48.05
Keybd hook: yes
Mouse hook: yes
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 0 (0 layers)
Modifiers (GetKeyState() now) =
Modifiers (Hook's Logical) =
Modifiers (Hook's Physical) =
Prefix key is down: no
NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script. The same method can be used to change the size of the history buffer. For example: #KeyHistory 100 (Default is 40, Max is 500)
The oldest are listed first. VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event. Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist.
VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
0D 01C d 2.28 Enter key_history.ahk
0D 01C u 0.09 Enter C:\Users\Leef_me\Documents\Autohotkey\key_history.ahk - AutoHotkey v1.0.48.05
A4 038 d 0.34 Alt
09 00F d 0.09 Tab
09 00F u 0.17 Tab Task Switching
09 00F d 0.52 Tab
09 00F u 0.17 Tab
A4 038 u 0.13 Alt
54 014 d 1.37 T Document1 - Microsoft Word
54 014 u 0.09 T
48 023 d 0.09 H
48 023 u 0.11 H
49 017 d 0.39 I
49 017 u 0.11 I
53 01F d 0.17 S
53 01F u 0.12 S
A0 02A d 0.47 Shift
A0 02A d 0.53 Shift
A0 02A d 0.03 Shift
A0 02A d 0.03 Shift
A0 02A d 0.05 Shift
24 147 d 0.05 Home
24 147 u 0.14 Home
A0 02A u 0.47 Shift
A2 01D d 1.34 Ctrl
A0 02A d 0.31 Shift
A0 02A d 0.53 Shift
A0 02A d 0.03 Shift
A0 02A d 0.03 Shift
A0 02A d 0.05 Shift
A0 02A d 0.03 Shift
A0 02A d 0.05 Shift
A0 02A d 0.03 Shift
A0 02A d 0.03 Shift
A0 02A d 0.05 Shift
A0 02A d 0.03 Shift
A0 02A d 0.05 Shift
BE 034 d 0.00 .
BE 034 u 0.09 .
BE 034 d 0.14 .
BE 034 u 0.09 .
BE 034 d 0.14 .
BE 034 u 0.11 .
BE 034 d 0.16 .
BE 034 u 0.11 .
BE 034 d 0.16 .
BE 034 u 0.11 .
BC 033 d 0.94 ,
BC 033 u 0.11 ,
BC 033 d 0.14 ,
BC 033 u 0.09 ,
BC 033 d 0.16 ,
BC 033 u 0.11 ,
BC 033 d 0.14 ,
BC 033 u 0.11 ,
BC 033 d 0.19 ,
BC 033 u 0.08 ,
A0 02A u 0.34 Shift
DD 01B d 0.94 ]
DD 01B u 0.11 ]
DD 01B d 0.14 ]
DD 01B u 0.09 ]
DD 01B d 0.13 ]
DD 01B u 0.11 ]
DD 01B d 0.11 ]
DD 01B u 0.13 ]
DD 01B d 0.13 ]
DD 01B u 0.11 ]
DB 01A d 0.84 [
DB 01A u 0.11 [
DB 01A d 0.11 [
DB 01A u 0.11 [
DB 01A d 0.13 [
DB 01A u 0.11 [
DB 01A d 0.14 [
DB 01A u 0.11 [
DB 01A d 0.14 [
DB 01A u 0.11 [
A2 01D u 0.64 Ctrl
A4 038 d 1.15 Alt
09 00F d 0.20 Tab
09 00F u 0.17 Tab Task Switching
A4 038 u 0.87 Alt
74 03F d 1.73 F5 C:\Users\Leef_me\Documents\Autohotkey\key_history.ahk - AutoHotkey v1.0.48.05
Press [F5] to refresh.
And here is the key_history script I used
Code:
#persistent
#InstallKeybdHook
#InstallMouseHook
message=
(
The window behing this message is the Key History Window
type a few keys '123'
and then hit F5
Do you see them in the key history?
press the mouse button
then hit F5 again
do you see what button was pushed?
)
KeyHistory ; Display the history info in a window.
msgbox %message%
#KeyHistory 100
;KeyHistory ; Display the history info in a window.
esc::exitapp ; press escape key to exit script
f1::
WinGetText, clipboard, A
return