Visual studio 在Visual Studio 2017中将windows键用作键盘快捷键的一部分

Visual studio 在Visual Studio 2017中将windows键用作键盘快捷键的一部分,visual-studio,visual-studio-2017,autohotkey,Visual Studio,Visual Studio 2017,Autohotkey,我有一个全局热键(在自动热键中)使用ctrl+alt+win+1,但Visual Studio 2017将其注册为ctrl+alt+1,导致这两个程序之间发生冲突 据介绍,不可能将#(windows)键作为VisualStudio键盘快捷键的一部分,但有没有办法让它不响应使用它的命令 很难说如何解决这个问题,我看不出您的问题中的Ahk脚本是什么,但您可以在Windows系统上尝试: 1-您可以运行外部Ahk脚本(在后台)[KeypressToReg.Ahk]此脚本可以扫描所有键盘移动,然后将其仅

我有一个全局热键(在自动热键中)使用ctrl+alt+win+1,但Visual Studio 2017将其注册为ctrl+alt+1,导致这两个程序之间发生冲突


据介绍,不可能将#(windows)键作为VisualStudio键盘快捷键的一部分,但有没有办法让它不响应使用它的命令

很难说如何解决这个问题,我看不出您的问题中的Ahk脚本是什么,但您可以在Windows系统上尝试:

1-您可以运行外部Ahk脚本(在后台)[KeypressToReg.Ahk]此脚本可以扫描所有键盘移动,然后将其仅放入一个[Windows注册表键]

这只是一个向您展示的模拟,它将把Keypress值写入单个寄存器键

2-然后您可以运行Visual Studio 2017,如果按[Ctrl+Alt+Win+1]键,可以查看[它是什么值]

(您可以使用此Ahk脚本[ShowKeypressValue.Ahk])(注意-此脚本仅用于查看它的值。)

3-现在您可以简单地使用字符串值
“Ctrl+Alt+LWin+1”
,而无需使用此
^!{LWin}1::
,以执行任何类型的Ahk代码。(您甚至可以从其他语言(如Visual Studio 2017)生成短脚本,只需访问该注册表项即可。)

ShowKeypressValue.ahk

#SingleInstance force
Gui, +AlwaysOnTop -MaximizeBox
Gui, Add, Text, center y10 h50 w300 vVar,  %KeypressValue%
Gui, Color, White
Gui, show
size=18
Gui, Font, s%size%
GuiControl, Font, var

loop
{
RegRead, KeypressValue, HKEY_CURRENT_USER,software\GetKeypressValue,KeypressValue ; read KeypressValue

if (KeypressValue="Ctrl + Alt + LWin + 1") 
{
; Here you can put the code. 
;WriteReg_KeypressValue("He it Works")
}

sleep 50
GuiControl,, var, %KeypressValue%
}

~esc::exitapp

WriteReg_KeypressValue(a)
{
RegWrite, REG_SZ, HKEY_CURRENT_USER,software\GetKeypressValue,KeypressValue,%a%  ;Write the KeypressValue
}
[KeypressToReg.ahk]

; KeypressToReg.ahk comes from KeypressOSD.ahk By RaptorX
; The Changelog you will find it on the Bottom of the script. 
;This code works with a getkeyname from a Dllcall (See Bottom Script- by Lexikos)
;you can press the esc key to exit.

#SingleInstance force
#NoEnv
SetBatchLines, -1
ListLines, Off

; Settings
    global TransN                := 200      ; 0~255
    global ShowSingleKey         := True
    global ShowMouseButton       := True
    global ShowSingleModifierKey := True
    global ShowModifierKeyCount  := true
    global ShowStickyModKeyCount := false
    global DisplayTime           := 2000     ; In milliseconds
    global GuiPosition           := "Bottom" ; Top or Bottom
    global FontSize              := 50
    global GuiHeight             := 115

CreateGUI()
CreateHotkey()
return

OnKeyPressed:
    try {
        key := GetKeyStr()
        ShowHotkey(key)
        SetTimer, HideGUI, % -1 * DisplayTime
    }
return

OnKeyUp:
return

_OnKeyUp:
    tickcount_start := A_TickCount
return


CreateGUI() {
    global

    Gui, +AlwaysOnTop -Caption +Owner +LastFound +E0x20
    Gui, Margin, 0, 0
    Gui, Color, Black
    Gui, Font, cWhite s%FontSize% bold, Arial
    Gui, Add, Text, vHotkeyText Center y20

    WinSet, Transparent, %TransN%
}

CreateHotkey() {
    Loop, 95
    {
        k := Chr(A_Index + 31)
        k := (k = " ") ? "Space" : k

        Hotkey, % "~*" k, OnKeyPressed
        Hotkey, % "~*" k " Up", _OnKeyUp
    }

    Loop, 24 ; F1-F24
    {
        Hotkey, % "~*F" A_Index, OnKeyPressed
        Hotkey, % "~*F" A_Index " Up", _OnKeyUp
    }

    Loop, 10 ; Numpad0 - Numpad9
    {
        Hotkey, % "~*Numpad" A_Index - 1, OnKeyPressed
        Hotkey, % "~*Numpad" A_Index - 1 " Up", _OnKeyUp
    }

    Otherkeys := "WheelDown|WheelUp|WheelLeft|WheelRight|XButton1|XButton2|Browser_Forward|Browser_Back|Browser_Refresh|Browser_Stop|Browser_Search|Browser_Favorites|Browser_Home|Volume_Mute|Volume_Down|Volume_Up|Media_Next|Media_Prev|Media_Stop|Media_Play_Pause|Launch_Mail|Launch_Media|Launch_App1|Launch_App2|Help|Sleep|PrintScreen|CtrlBreak|Break|AppsKey|NumpadDot|NumpadDiv|NumpadMult|NumpadAdd|NumpadSub|NumpadEnter|Tab|Enter|Esc|BackSpace"
               . "|Del|Insert|Home|End|PgUp|PgDn|Up|Down|Left|Right|ScrollLock|CapsLock|NumLock|Pause|sc145|sc146|sc046|sc123"
    Loop, parse, Otherkeys, |
    {
        Hotkey, % "~*" A_LoopField, OnKeyPressed
        Hotkey, % "~*" A_LoopField " Up", _OnKeyUp
    }

    If ShowMouseButton {
        Loop, Parse, % "LButton|MButton|RButton", |
            Hotkey, % "~*" A_LoopField, OnKeyPressed
    }

    for i, mod in ["Ctrl", "Shift", "Alt"] {
        Hotkey, % "~*" mod, OnKeyPressed
        Hotkey, % "~*" mod " Up", OnKeyUp
    }
    for i, mod in ["LWin", "RWin"]
        Hotkey, % "~*" mod, OnKeyPressed
}

ShowHotkey(HotkeyStr) {
    WinGetPos, ActWin_X, ActWin_Y, ActWin_W, ActWin_H, A
    if !ActWin_W
        throw

    text_w := (ActWin_W > A_ScreenWidth) ? A_ScreenWidth : ActWin_W
    ;GuiControl,     , HotkeyText, %HotkeyStr%
    ;GuiControl, Move, HotkeyText, w%text_w% Center
    RegWrite, REG_SZ, HKEY_CURRENT_USER,software\GetKeypressValue,KeypressValue,%HotkeyStr%

    if (GuiPosition = "Top")
        gui_y := ActWin_Y
    else
        gui_y := (ActWin_Y+ActWin_H) - 115 - 50

    ;Gui, Show, NoActivate x%ActWin_X% y%gui_y% h%GuiHeight% w%text_w%
}

GetKeyStr() {
    static modifiers := ["Ctrl", "Shift", "Alt", "LWin", "RWin"]
    static repeatCount := 1

    for i, mod in modifiers {
        if GetKeyState(mod)
            prefix .= mod " + "
    }

    if (!prefix && !ShowSingleKey)
        throw

    key := SubStr(A_ThisHotkey, 3)

    if (key ~= "i)^(Ctrl|Shift|Alt|LWin|RWin)$") {
        if !ShowSingleModifierKey {
            throw
        }
        key := ""
        prefix := RTrim(prefix, "+ ")

        if ShowModifierKeyCount {
            if !InStr(prefix, "+") && IsDoubleClickEx() {
                if (A_ThisHotKey != A_PriorHotKey) || ShowStickyModKeyCount {
                    if (++repeatCount > 1) {
                        prefix .= " ( * " repeatCount " )"
                    }
                } else {
                    repeatCount := 0
                }
            } else {
                repeatCount := 1
            }
        }
    } else {
        if ( StrLen(key) = 1 ) {
            key := GetKeyChar(key, "A")
        } else if ( SubStr(key, 1, 2) = "sc" ) {
            key := SpecialSC(key)
        } else if (key = "LButton") && IsDoubleClick() {
            key := "Double-Click"
        }
        _key := (key = "Double-Click") ? "LButton" : key

        static pre_prefix, pre_key, keyCount := 1
        global tickcount_start
        if (prefix && pre_prefix) && (A_TickCount-tickcount_start < 300) {
            if (prefix != pre_prefix) {
                result := pre_prefix pre_key ", " prefix key
            } else {
                keyCount := (key=pre_key) ? (keyCount+1) : 1
                key := (keyCount>2) ? (key " (" keyCount ")") : (pre_key ", " key)
            }
        } else {
            keyCount := 1
        }

        pre_prefix := prefix
        pre_key := _key

        repeatCount := 1
    }
    return result ? result : prefix . key
}

SpecialSC(sc) {
    static k := {sc046: "ScrollLock", sc145: "NumLock", sc146: "Pause", sc123: "Genius LuxeMate Scroll"}
    return k[sc]
}

; by Lexikos - https://autohotkey.com/board/topic/110808-getkeyname-for-other-languages/#entry682236
GetKeyChar(Key, WinTitle:=0) {
    thread := WinTitle=0 ? 0
        : DllCall("GetWindowThreadProcessId", "ptr", WinExist(WinTitle), "ptr", 0)
    hkl := DllCall("GetKeyboardLayout", "uint", thread, "ptr")
    vk := GetKeyVK(Key), sc := GetKeySC(Key)
    VarSetCapacity(state, 256, 0)
    VarSetCapacity(char, 4, 0)
    n := DllCall("ToUnicodeEx", "uint", vk, "uint", sc
        , "ptr", &state, "ptr", &char, "int", 2, "uint", 0, "ptr", hkl)
    return StrGet(&char, n, "utf-16")
}

IsDoubleClick(MSec = 300) {
    Return (A_ThisHotKey = A_PriorHotKey) && (A_TimeSincePriorHotkey < MSec)
}

IsDoubleClickEx(MSec = 300) {
    preHotkey := RegExReplace(A_PriorHotkey, "i) Up$")
    Return (A_ThisHotKey = preHotkey) && (A_TimeSincePriorHotkey < MSec)
}

HideGUI() {
    Gui, Hide
}

esc::exitapp    
;---------------------------------------------
; ChangeLog : v2.22 (2017-02-25) - Now pressing the same combination keys continuously more than 2 times,
;                                  for example press Ctrl+V 3 times, will displayed as "Ctrl + v (3)"
;             v2.21 (2017-02-24) - Fixed LWin/RWin not poping up start menu
;             v2.20 (2017-02-24) - Added displaying continuous-pressed combination keys.
;                                  e.g.: With CTRL key held down, pressing K and U continuously will shown as "Ctrl + k, u"
;             v2.10 (2017-01-22) - Added ShowStickyModKeyCount option
;             v2.09 (2017-01-22) - Added ShowModifierKeyCount option
;             v2.08 (2017-01-19) - Fixed a bug
;             v2.07 (2017-01-19) - Added ShowSingleModifierKey option (default is True)
;             v2.06 (2016-11-23) - Added more keys. Thanks to SashaChernykh.
;             v2.05 (2016-10-01) - Fixed not detecting "Ctrl + ScrollLock/NumLock/Pause". Thanks to lexikos.
;             v2.04 (2016-10-01) - Added NumpadDot and AppsKey
;             v2.03 (2016-09-17) - Added displaying "Double-Click" of the left mouse button.
;             v2.02 (2016-09-16) - Added displaying mouse button, and 3 settings (ShowMouseButton, FontSize, GuiHeight)
;             v2.01 (2016-09-11) - Display non english keyboard layout characters when combine with modifer keys.
;             v2.00 (2016-09-01) - Removed the "Fade out" effect because of its buggy.
;                                - Added support for non english keyboard layout.
;                                - Added GuiPosition setting.
;             v1.00 (2013-10-11) - First release.
;--------------------------------------------
;KeypressToReg.ahk来自Raptrox提供的KeypressOSD.ahk
; 您将在脚本底部找到更改日志。
;此代码使用Dllcall中的getkeyname(请参见底部脚本-由Lexikos编写)
;您可以按esc键退出。
#单实例力
#诺恩
设置行,-1
列表行,关闭
; 设置
全局TransN:=200;0~255
全局ShowSingleKey:=True
全局显示鼠标按钮:=True
全局ShowSingleModifierKey:=真
全局ShowModifierKeyCount:=真
全局ShowStickyModKeyCount:=false
全局显示时间:=2000;以毫秒计
全局位置:=“底部”;上下
全局字体大小:=50
全局高度:=115
CreateGUI()
CreateHotkey()
返回
按ON键:
试一试{
键:=GetKeyStr()
显示热键(键)
SetTimer,HideGUI,%-1*DisplayTime
}
返回
OnKeyUp:
返回
_OnKeyUp:
滴答声计数\u开始:=滴答声计数
返回
CreateGUI(){
全球的
Gui,+AlwaysOnTop-Caption+Owner+LastFound+E0x20
图形用户界面,页边距,0,0
图形用户界面,颜色,黑色
Gui,字体,白色s%FontSize%bold,Arial
Gui,添加,文本,vHotkeyText中心y20
WinSet,透明,%TransN%
}
CreateHotkey(){
环路,95
{
k:=Chr(A_指数+31)
k:=(k=”“)?“空格”:k
热键,%“~*”k,按ON键
热键,%“~*”k“向上”\u OnKeyUp
}
环路,24;F1-F24
{
热键,“~*F”A_索引,按ON键
热键,%“~*F”A_索引“向上”,向上键
}
循环,10;Numpad0-Numpad9
{
热键,%“~*Numpad”A_索引-1,按ON键
热键,%“~*Numpad”A_索引-1“向上”,向上键
}
其他键:="(2)浏览者(向前)浏览器(返回)浏览器(返回)浏览器(返回)浏览器(返回)浏览器(浏览器)更新(浏览器)浏览器(更新)浏览器(浏览器(更新)浏览器(浏览)网站(调查)方方方方方方方;浏览器(停止)浏览器(浏览)方方方方方方方方方方方方)方方方方方方方方方方方方(方)方(方)方(方)方(方)方)方(方)方(方)方)方(方)方(方)方)方)方(方)方)方)方(方)方)方(方)方)方)方(方)方(方)方)方(方)方)方)方)方)方(方)方)方)方(方)方)方(方)方)方(方)方)方)方)方)方)方)方(方)方)方)方)方)方(方(方)方)方(方)方)方)方(方Help | Sleep | PrintScreen | CtrlBreak | Break | AppsKey | NumpadDot | NumpadDiv | NumpadMult | numpaddad | NumpadSub | NumpadEnter |选项卡|输入| Esc |退格”
“| Del | Insert | Home | End | PgUp | PgDn | Up | Down | Left | Right | scrollock | CapsLock | NumLock | Pause | sc145 | sc146 | sc046 | sc123”
循环、解析、其他键|
{
热键,%“~*”A_循环字段,按ON键
热键,%“~*”A\u循环字段“向上”,“向上”
}
如果显示鼠标按钮{
循环,解析,%%“LButton | MButton | RButton”|
热键,%“~*”A_循环字段,按ON键
}
对于i,mod in[“Ctrl”、“Shift”、“Alt”]{
热键,“~*”模式,按ON键
热键,%“~*”mod“Up”,OnKeyUp
}
对于i,mod in[“LWin”,“RWin”]
热键,“~*”模式,按ON键
}
显示热键(热键TR){
Wingtpos,ActWin_X,ActWin_Y,ActWin_W,ActWin_H,A
如果
扔
文本宽度:=(ActWin\u w>A\u屏幕宽度)?A\u屏幕宽度:ActWin\u w
;GuiControl,,HotkeyText,%HotkeyStr%
;GUI控件、移动、热键文本、w%文本和w%中心
RegWrite,REG_SZ,HKEY_当前用户,软件\GetKeypressValue,KeypressValue,%HotkeyStr%
if(GuiPosition=“Top”)
gui_y:=ActWin_y
其他的
gui_y:=(ActWin_y+ActWin_H)-115-50
;Gui,显示,不激活x%ActWin_x%y%Gui_y%h%Gui高度%w%text_w%
}
GetKeyStr(){
静态修改器:=[“Ctrl”、“Shift”、“Alt”、“LWin”、“RWin”]
静态重复计数:=1
对于i,修改器中的mod{
如果GetKeyState(mod)
前缀=mod“+”
}
如果(!prefix&&!ShowSingleKey)
扔
key:=SubStr(A_this热键,3)
如果(键~=“i)^(Ctrl | Shift | Alt | LWin | RWin)$”){
如果!showrey{
扔
}
键:=“”
前缀:=RTrim(前缀“+”)
如果显示ModifierKeyCount{
if!InStr(前缀“+”&&IsDoubleClickEx(){
如果(A_this热键!=A_prior热键)| | ShowStickyModKeyCount{
如果(++repeatCount>1){
前缀=“(*“repeatCount”)”
}
}否则{
重复计数:=0
}
}否则{
重复计数:=1
}
}
}否则{
如果(StrLen(键)=1){
键:=GetKeyChar(键“A”)
}否则,如果(子字符串(键,1,2)=“sc”){
键:=SpecialSC(键)
}否则,如果(key=“LButton”)&&Is
; KeypressToReg.ahk comes from KeypressOSD.ahk By RaptorX
; The Changelog you will find it on the Bottom of the script. 
;This code works with a getkeyname from a Dllcall (See Bottom Script- by Lexikos)
;you can press the esc key to exit.

#SingleInstance force
#NoEnv
SetBatchLines, -1
ListLines, Off

; Settings
    global TransN                := 200      ; 0~255
    global ShowSingleKey         := True
    global ShowMouseButton       := True
    global ShowSingleModifierKey := True
    global ShowModifierKeyCount  := true
    global ShowStickyModKeyCount := false
    global DisplayTime           := 2000     ; In milliseconds
    global GuiPosition           := "Bottom" ; Top or Bottom
    global FontSize              := 50
    global GuiHeight             := 115

CreateGUI()
CreateHotkey()
return

OnKeyPressed:
    try {
        key := GetKeyStr()
        ShowHotkey(key)
        SetTimer, HideGUI, % -1 * DisplayTime
    }
return

OnKeyUp:
return

_OnKeyUp:
    tickcount_start := A_TickCount
return


CreateGUI() {
    global

    Gui, +AlwaysOnTop -Caption +Owner +LastFound +E0x20
    Gui, Margin, 0, 0
    Gui, Color, Black
    Gui, Font, cWhite s%FontSize% bold, Arial
    Gui, Add, Text, vHotkeyText Center y20

    WinSet, Transparent, %TransN%
}

CreateHotkey() {
    Loop, 95
    {
        k := Chr(A_Index + 31)
        k := (k = " ") ? "Space" : k

        Hotkey, % "~*" k, OnKeyPressed
        Hotkey, % "~*" k " Up", _OnKeyUp
    }

    Loop, 24 ; F1-F24
    {
        Hotkey, % "~*F" A_Index, OnKeyPressed
        Hotkey, % "~*F" A_Index " Up", _OnKeyUp
    }

    Loop, 10 ; Numpad0 - Numpad9
    {
        Hotkey, % "~*Numpad" A_Index - 1, OnKeyPressed
        Hotkey, % "~*Numpad" A_Index - 1 " Up", _OnKeyUp
    }

    Otherkeys := "WheelDown|WheelUp|WheelLeft|WheelRight|XButton1|XButton2|Browser_Forward|Browser_Back|Browser_Refresh|Browser_Stop|Browser_Search|Browser_Favorites|Browser_Home|Volume_Mute|Volume_Down|Volume_Up|Media_Next|Media_Prev|Media_Stop|Media_Play_Pause|Launch_Mail|Launch_Media|Launch_App1|Launch_App2|Help|Sleep|PrintScreen|CtrlBreak|Break|AppsKey|NumpadDot|NumpadDiv|NumpadMult|NumpadAdd|NumpadSub|NumpadEnter|Tab|Enter|Esc|BackSpace"
               . "|Del|Insert|Home|End|PgUp|PgDn|Up|Down|Left|Right|ScrollLock|CapsLock|NumLock|Pause|sc145|sc146|sc046|sc123"
    Loop, parse, Otherkeys, |
    {
        Hotkey, % "~*" A_LoopField, OnKeyPressed
        Hotkey, % "~*" A_LoopField " Up", _OnKeyUp
    }

    If ShowMouseButton {
        Loop, Parse, % "LButton|MButton|RButton", |
            Hotkey, % "~*" A_LoopField, OnKeyPressed
    }

    for i, mod in ["Ctrl", "Shift", "Alt"] {
        Hotkey, % "~*" mod, OnKeyPressed
        Hotkey, % "~*" mod " Up", OnKeyUp
    }
    for i, mod in ["LWin", "RWin"]
        Hotkey, % "~*" mod, OnKeyPressed
}

ShowHotkey(HotkeyStr) {
    WinGetPos, ActWin_X, ActWin_Y, ActWin_W, ActWin_H, A
    if !ActWin_W
        throw

    text_w := (ActWin_W > A_ScreenWidth) ? A_ScreenWidth : ActWin_W
    ;GuiControl,     , HotkeyText, %HotkeyStr%
    ;GuiControl, Move, HotkeyText, w%text_w% Center
    RegWrite, REG_SZ, HKEY_CURRENT_USER,software\GetKeypressValue,KeypressValue,%HotkeyStr%

    if (GuiPosition = "Top")
        gui_y := ActWin_Y
    else
        gui_y := (ActWin_Y+ActWin_H) - 115 - 50

    ;Gui, Show, NoActivate x%ActWin_X% y%gui_y% h%GuiHeight% w%text_w%
}

GetKeyStr() {
    static modifiers := ["Ctrl", "Shift", "Alt", "LWin", "RWin"]
    static repeatCount := 1

    for i, mod in modifiers {
        if GetKeyState(mod)
            prefix .= mod " + "
    }

    if (!prefix && !ShowSingleKey)
        throw

    key := SubStr(A_ThisHotkey, 3)

    if (key ~= "i)^(Ctrl|Shift|Alt|LWin|RWin)$") {
        if !ShowSingleModifierKey {
            throw
        }
        key := ""
        prefix := RTrim(prefix, "+ ")

        if ShowModifierKeyCount {
            if !InStr(prefix, "+") && IsDoubleClickEx() {
                if (A_ThisHotKey != A_PriorHotKey) || ShowStickyModKeyCount {
                    if (++repeatCount > 1) {
                        prefix .= " ( * " repeatCount " )"
                    }
                } else {
                    repeatCount := 0
                }
            } else {
                repeatCount := 1
            }
        }
    } else {
        if ( StrLen(key) = 1 ) {
            key := GetKeyChar(key, "A")
        } else if ( SubStr(key, 1, 2) = "sc" ) {
            key := SpecialSC(key)
        } else if (key = "LButton") && IsDoubleClick() {
            key := "Double-Click"
        }
        _key := (key = "Double-Click") ? "LButton" : key

        static pre_prefix, pre_key, keyCount := 1
        global tickcount_start
        if (prefix && pre_prefix) && (A_TickCount-tickcount_start < 300) {
            if (prefix != pre_prefix) {
                result := pre_prefix pre_key ", " prefix key
            } else {
                keyCount := (key=pre_key) ? (keyCount+1) : 1
                key := (keyCount>2) ? (key " (" keyCount ")") : (pre_key ", " key)
            }
        } else {
            keyCount := 1
        }

        pre_prefix := prefix
        pre_key := _key

        repeatCount := 1
    }
    return result ? result : prefix . key
}

SpecialSC(sc) {
    static k := {sc046: "ScrollLock", sc145: "NumLock", sc146: "Pause", sc123: "Genius LuxeMate Scroll"}
    return k[sc]
}

; by Lexikos - https://autohotkey.com/board/topic/110808-getkeyname-for-other-languages/#entry682236
GetKeyChar(Key, WinTitle:=0) {
    thread := WinTitle=0 ? 0
        : DllCall("GetWindowThreadProcessId", "ptr", WinExist(WinTitle), "ptr", 0)
    hkl := DllCall("GetKeyboardLayout", "uint", thread, "ptr")
    vk := GetKeyVK(Key), sc := GetKeySC(Key)
    VarSetCapacity(state, 256, 0)
    VarSetCapacity(char, 4, 0)
    n := DllCall("ToUnicodeEx", "uint", vk, "uint", sc
        , "ptr", &state, "ptr", &char, "int", 2, "uint", 0, "ptr", hkl)
    return StrGet(&char, n, "utf-16")
}

IsDoubleClick(MSec = 300) {
    Return (A_ThisHotKey = A_PriorHotKey) && (A_TimeSincePriorHotkey < MSec)
}

IsDoubleClickEx(MSec = 300) {
    preHotkey := RegExReplace(A_PriorHotkey, "i) Up$")
    Return (A_ThisHotKey = preHotkey) && (A_TimeSincePriorHotkey < MSec)
}

HideGUI() {
    Gui, Hide
}

esc::exitapp    
;---------------------------------------------
; ChangeLog : v2.22 (2017-02-25) - Now pressing the same combination keys continuously more than 2 times,
;                                  for example press Ctrl+V 3 times, will displayed as "Ctrl + v (3)"
;             v2.21 (2017-02-24) - Fixed LWin/RWin not poping up start menu
;             v2.20 (2017-02-24) - Added displaying continuous-pressed combination keys.
;                                  e.g.: With CTRL key held down, pressing K and U continuously will shown as "Ctrl + k, u"
;             v2.10 (2017-01-22) - Added ShowStickyModKeyCount option
;             v2.09 (2017-01-22) - Added ShowModifierKeyCount option
;             v2.08 (2017-01-19) - Fixed a bug
;             v2.07 (2017-01-19) - Added ShowSingleModifierKey option (default is True)
;             v2.06 (2016-11-23) - Added more keys. Thanks to SashaChernykh.
;             v2.05 (2016-10-01) - Fixed not detecting "Ctrl + ScrollLock/NumLock/Pause". Thanks to lexikos.
;             v2.04 (2016-10-01) - Added NumpadDot and AppsKey
;             v2.03 (2016-09-17) - Added displaying "Double-Click" of the left mouse button.
;             v2.02 (2016-09-16) - Added displaying mouse button, and 3 settings (ShowMouseButton, FontSize, GuiHeight)
;             v2.01 (2016-09-11) - Display non english keyboard layout characters when combine with modifer keys.
;             v2.00 (2016-09-01) - Removed the "Fade out" effect because of its buggy.
;                                - Added support for non english keyboard layout.
;                                - Added GuiPosition setting.
;             v1.00 (2013-10-11) - First release.
;--------------------------------------------