2016-11-05 1 views
2

Ich migriere meine Mac-Workflow zu Windows. Eine Sache, ohne die ich nicht leben könnte, ist der Hyperkey, der eine Kombination aus Ctrl + Option + Shift + Cmd ist. Ich benutze Karabiner App, Capslock zu diesem Schlüssel neu zuordnen. Ich habe gehört, dass Autohotkey ist ein Karabiner Alternative für Windows. Könnt ihr mir bitte helfen, diese Funktion in Windows zu emulieren?Wie emphiere ich Hyperkey in Windows 10 mit autohotkey

Mein ideales Ergebnis ist:

  • deaktivieren Capslock vollständig, weil ich diese selten
  • Toggle verwenden Capslock wird ESC Schlüssel
  • Capslock wird durchführen Halten Sie führen Ctrl + Alt + Shift + Windows. Zum Beispiel Capslock + C wird Ctrl+Alt+Shift+Windows+C sein

Vielen Dank im Voraus!

Das folgende ist mein Versuch mit ahk Skript, aber es hat nicht funktioniert :(

;----------------------------------------- 
; hyper key for windows 
;========================================= 

; -------------------------------------------------------------- 
; notes 
; -------------------------------------------------------------- 
; ! = alt 
;^= ctrl 
; + = shift 
; # = lwin|rwin 
; 
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. 
#UseHook 
#InstallKeybdHook 
#SingleInstance force 

SendMode Input 

;; deactivate capslock completely 
SetCapslockState, AlwaysOff 

;; remap capslock to hyper 
Capslock:: 
SendInput {Blind}{Ctrl Down}{Alt Down}{Shift Down}{LWin Down} 
return 

Capslock up:: 
SendInput {Blind}{Ctrl Up}{Alt Up}{Shift Up}{LWin Up} 
return 

;; vim navigation with hyper 
^!+#h:: SendInput {Blind}{Left} 
^!+#h up:: SendInput {Blind}{Left Up} 
^!+#l:: SendInput {Blind}{Right} 
^!+#k:: SendInput {Blind}{Up} 
^!+#j:: SendInput {Blind}{Down} 

;; popular hotkeys with hyper 
^!+#c::^c 
^!+#v::^v 
+0

keine Programmiersprache Frage -.?. try [su] –

+0

@PaulR tks für mich deutete auf dieser Website werde ich die gleiche Frage schreiben, obwohl ich ** Autohotkey Skript gedacht ** ist auch eine Art von Programmiersprache – babygau

+1

Ich denke, es könnte sein eine Programmierfrage, wenn Sie versucht haben, ein Autohotkey-Skript zu schreiben und es nicht funktionierte. In diesem Fall würden Sie das nicht funktionierende Skript hier posten und um Hilfe bitten, es zu beheben. Aber so wie es aussieht, liest sich die Frage eher wie ein allgemeines Benutzerlevel-Problem, d. H. "Wie mache ich X mit Software Y?". –

Antwort

9

Vielen Dank für jeden, der versucht, mir zu helfen, dachte ich, meine eigenen, die prob heraus und teilen möchte es für den Fall, in diesem prob jemand kommt

#NoEnv ; recommended for performance and compatibility with future autohotkey releases. 
#UseHook 
#InstallKeybdHook 
#SingleInstance force 

SendMode Input 

;; deactivate capslock completely 
SetCapslockState, AlwaysOff 

;; remap capslock to hyper 
;; if capslock is toggled, remap it to esc 

;; note: must use tidle prefix to fire hotkey once it is pressed 
;; not until the hotkey is released 
~Capslock:: 
    ;; must use downtemp to emulate hyper key, you cannot use down in this case 
    ;; according to https://autohotkey.com/docs/commands/Send.htm, downtemp is as same as down except for ctrl/alt/shift/win keys 
    ;; in those cases, downtemp tells subsequent sends that the key is not permanently down, and may be 
    ;; released whenever a keystroke calls for it. 
    ;; for example, Send {Ctrl Downtemp} followed later by Send {Left} would produce a normal {Left} 
    ;; keystroke, not a Ctrl{Left} keystroke 
    Send {Ctrl DownTemp}{Shift DownTemp}{Alt DownTemp}{LWin DownTemp} 
    KeyWait, Capslock 
    Send {Ctrl Up}{Shift Up}{Alt Up}{LWin Up} 
    if (A_PriorKey = "Capslock") { 
     Send {Esc} 
    } 
return 

;; vim navigation with hyper 
~Capslock & h:: Send {Left} 
~Capslock & l:: Send {Right} 
~Capslock & k:: Send {Up} 
~Capslock & j:: Send {Down} 

;; popular hotkeys with hyper 
~Capslock & c:: Send ^{c} 
~Capslock & v:: Send ^{v} 
+0

die einzige Antwort, die ich auf Capslock hyper unter Windows mit Autohotkey gefunden habe. Danke @Babygau !! – snowbound

+0

INSANE. Danke vielmals! Dies benötigt mehr Upvotes. VIM-Typ hier auch, also ist das ein Bonus. Ich benutze die gleichen Kombinationen. – Vik

Verwandte Themen