summaryrefslogtreecommitdiff
path: root/windows/neo-vars/src/source
diff options
context:
space:
mode:
authormösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2008-11-27 10:03:13 +0000
committermösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2008-11-27 10:03:13 +0000
commitb59eb347eda558fea9bca80a3ca181385d0ffef7 (patch)
treebc1007da01cada7d45aac52e09148b3c19e6dc84 /windows/neo-vars/src/source
parent943387a5f1eb288c8ccfec11b7ac544d0616bbb1 (diff)
downloadneo-layout-b59eb347eda558fea9bca80a3ca181385d0ffef7.tar.gz
neo-layout-b59eb347eda558fea9bca80a3ca181385d0ffef7.tar.bz2
neo-layout-b59eb347eda558fea9bca80a3ca181385d0ffef7.zip
• Hook für die Funktionstasten auf sämtlichen Ebenen aktiviert (also auch bei gedrücktem Shift, etc).
• Modifier (Shift, Mod3, Mod4, rechts und links) nun in den allgemeinen Hook-Mechanismus (AllStar) eingebunden. git-svn-id: https://svn.neo-layout.org@1249 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows/neo-vars/src/source')
-rw-r--r--windows/neo-vars/src/source/keydefinitions.ahk8
-rw-r--r--windows/neo-vars/src/source/keyhooks.ahk164
-rw-r--r--windows/neo-vars/src/source/varsfunctions.ahk126
3 files changed, 174 insertions, 124 deletions
diff --git a/windows/neo-vars/src/source/keydefinitions.ahk b/windows/neo-vars/src/source/keydefinitions.ahk
index 4989997..7b03b12 100644
--- a/windows/neo-vars/src/source/keydefinitions.ahk
+++ b/windows/neo-vars/src/source/keydefinitions.ahk
@@ -102,6 +102,14 @@ ED1("left" ,"SLeft")
ED1("right" ,"SRght")
ED1("numpadenter","SNEnt")
+; Die Modifier
+ED1("VKA0SC02A","PM2LD") ; Mod2L (ShiftL)
+ED1("VKA1SC136","PM2RD") ; Mod2R (ShiftR)
+ED1("VK14SC03A","PM3LD") ; Mod3L (CapsLock)
+ED1("VKBFSC02B","PM3RD") ; Mod3R (#')
+ED1("VKE2SC056","PM4LD") ; Mod4L (<>)
+ED1("VKA5SC138","PM4RD") ; Mod4R (AltGr)
+
ED(pos,caps,e1,e2,e3,e4,e5,e6,e7="",e8="") {
global
if (caps == 0)
diff --git a/windows/neo-vars/src/source/keyhooks.ahk b/windows/neo-vars/src/source/keyhooks.ahk
index 9def2b8..b7fbbd7 100644
--- a/windows/neo-vars/src/source/keyhooks.ahk
+++ b/windows/neo-vars/src/source/keyhooks.ahk
@@ -8,122 +8,22 @@
Suspend, Permit
goto togglesuspend
-~*VKA1SC136::
- if (isShiftLPressed and !isShiftRPressed and !wasNonShiftKeyPressed)
- ToggleMod2Lock()
- isShiftRPressed := 1
- isShiftPressed := 1
- wasNonShiftKeyPressed := 0
- EbeneAktualisieren()
-return
-
-~*VKA1SC136 up::
- isShiftRPressed := 0
- isShiftPressed := isShiftLPressed
- EbeneAktualisieren()
-return
-
-~*VKA0SC02A::
- if (isShiftRPressed and !isShiftLPressed and !wasNonShiftKeyPressed)
- ToggleMod2Lock()
- isShiftLPressed := 1
- isShiftPressed := 1
- wasNonShiftKeyPressed := 0
- EbeneAktualisieren()
-return
-
-~*VKA0SC02A up::
- isShiftLPressed := 0
- isShiftPressed := isShiftRPressed
- EbeneAktualisieren()
-return
-
-*VKBFSC02B::
- if (isMod3LPressed and !isMod3RPressed and !wasNonShiftKeyPressed)
- CharStarDown("MOD3", "MOD3", "SComp")
- isMod3RPressed := 1
- isMod3Pressed := 1
- wasNonShiftKeyPressed := 0
- EbeneAktualisieren()
-return
-
-*VKBFSC02B up::
- if (isMod3LPressed)
- CharStarUp("MOD3")
- isMod3RPressed := 0
- isMod3Pressed := isMod3LPressed
- EbeneAktualisieren()
-return
-
-*VK14SC03A::
- if (isMod3RPressed and !isMod3LPressed and !wasNonShiftKeyPressed)
- CharStarDown("MOD3", "MOD3", "SComp")
- isMod3LPressed := 1
- isMod3Pressed := 1
- wasNonShiftKeyPressed := 0
- EbeneAktualisieren()
-return
-
-*VK14SC03A up::
- if (isMod3RPressed)
- CharStarUp("MOD3")
- isMod3LPressed := 0
- isMod3Pressed := isMod3RPressed
- EbeneAktualisieren()
-return
-
-*VKA5SC138::
- wasMod4RPressed := isMod4RPressed
- isMod4RPressed := 1
- isMod4Pressed := 1
- waswasNonShiftKeyPressed := wasNonShiftKeyPressed
- wasNonShiftKeyPressed := 0
- EbeneAktualisieren()
- if (isMod4LPressed and !wasMod4RPressed and !waswasNonShiftKeyPressed)
- ToggleMod4Lock()
-return
-
-*VKA5SC138 up::
- isMod4RPressed := 0
- isMod4Pressed := isMod4LPressed
- EbeneAktualisieren()
-return
-
-*VKE2SC056::
- wasMod4LPressed := isMod4LPressed
- isMod4LPressed := 1
- isMod4Pressed := 1
- waswasNonShiftKeyPressed := wasNonShiftKeyPressed
- wasNonShiftKeyPressed := 0
- EbeneAktualisieren()
- if (isMod4RPressed and !wasMod4LPressed and !waswasNonShiftKeyPressed)
- ToggleMod4Lock()
-return
-
-*VKE2SC056 up::
- isMod4LPressed := 0
- isMod4Pressed := isMod4RPressed
- EbeneAktualisieren()
-return
-
-
-
;;;;;; DOWN EVENTS
; Funktionstasten
-F1::
-F2::
-F3::
-F4::
-F5::
-F6::
-F7::
-F8::
-F9::
-F10::
-F11::
-F12::
+*F1::
+*F2::
+*F3::
+*F4::
+*F5::
+*F6::
+*F7::
+*F8::
+*F9::
+*F10::
+*F11::
+*F12::
; Reihe 1
@@ -233,22 +133,30 @@ esc::
*right::
numpadenter::
+; Modifier
+*VKA0SC02A:: ; ShiftL
+*VKA1SC136:: ; ShiftR
+*VK14SC03A:: ; Mod3L
+*VKBFSC02B:: ; Mod3R
+*VKE2SC056:: ; Mod4L
+*VKA5SC138:: ; Mod4R
+
;;;;;; UP EVENTS
; Funktionstasten
-F1 up::
-F2 up::
-F3 up::
-F4 up::
-F5 up::
-F6 up::
-F7 up::
-F8 up::
-F9 up::
-F10 up::
-F11 up::
-F12 up::
+*F1 up::
+*F2 up::
+*F3 up::
+*F4 up::
+*F5 up::
+*F6 up::
+*F7 up::
+*F8 up::
+*F9 up::
+*F10 up::
+*F11 up::
+*F12 up::
; Reihe 1
@@ -358,5 +266,13 @@ esc up::
*right up::
numpadenter up::
+; Modifier
+*VKA0SC02A up:: ; ShiftL
+*VKA1SC136 up:: ; ShiftR
+*VK14SC03A up:: ; Mod3L
+*VKBFSC02B up:: ; Mod3R
+*VKE2SC056 up:: ; Mod4L
+*VKA5SC138 up:: ; Mod4R
+
AllStar(A_ThisHotkey)
return
diff --git a/windows/neo-vars/src/source/varsfunctions.ahk b/windows/neo-vars/src/source/varsfunctions.ahk
index 5983f83..58a79f6 100644
--- a/windows/neo-vars/src/source/varsfunctions.ahk
+++ b/windows/neo-vars/src/source/varsfunctions.ahk
@@ -37,6 +37,11 @@ AllStar(This_HotKey) {
CharStarDown(PhysKey, ActKey, char) {
global
+ if (SubStr(char,1,1)=="P") {
+ SubProc := SubStr(char,2,4)
+ CharProc%SubProc%()
+ return
+ }
wasNonShiftKeyPressed := 1
if (PP%PhysKey% != "")
CompNew := PP%PhysKey% ; Von Tastaturwiederholung
@@ -187,6 +192,127 @@ CharProcRlod() {
reload
}
+; Modifier
+CharProcM2LD() {
+ global
+ if (isShiftRPressed and !isShiftLPressed and !wasNonShiftKeyPressed)
+ ToggleMod2Lock()
+ isShiftLPressed := 1
+ isShiftPressed := 1
+ wasNonShiftKeyPressed := 0
+ EbeneAktualisieren()
+ PRVKA0SC02A := "PM2LU"
+ send {blind}{LShift Down}
+}
+
+CharProcM2LU() {
+ global
+ isShiftLPressed := 0
+ isShiftPressed := isShiftRPressed
+ EbeneAktualisieren()
+ send {blind}{LShift Up}
+}
+
+CharProcM2RD() {
+ global
+ if (isShiftLPressed and !isShiftRPressed and !wasNonShiftKeyPressed)
+ ToggleMod2Lock()
+ isShiftRPressed := 1
+ isShiftPressed := 1
+ wasNonShiftKeyPressed := 0
+ EbeneAktualisieren()
+ PRVKA1SC136 := "PM2RU"
+ send {blind}{RShift Down}
+}
+
+CharProcM2RU() {
+ global
+ isShiftRPressed := 0
+ isShiftPressed := isShiftLPressed
+ EbeneAktualisieren()
+ send {blind}{RShift Up}
+}
+
+CharProcM3LD() {
+ global
+ if (isMod3RPressed and !isMod3LPressed and !wasNonShiftKeyPressed)
+ CharStarDown("MOD3", "MOD3", "SComp")
+ isMod3LPressed := 1
+ isMod3Pressed := 1
+ wasNonShiftKeyPressed := 0
+ EbeneAktualisieren()
+ PRVK14SC03A := "PM3LU"
+}
+
+CharProcM3LU() {
+ global
+ if (isMod3RPressed)
+ CharStarUp("MOD3")
+ isMod3LPressed := 0
+ isMod3Pressed := isMod3RPressed
+ EbeneAktualisieren()
+}
+
+CharProcM3RD() {
+ global
+ if (isMod3LPressed and !isMod3RPressed and !wasNonShiftKeyPressed)
+ CharStarDown("MOD3", "MOD3", "SComp")
+ isMod3RPressed := 1
+ isMod3Pressed := 1
+ wasNonShiftKeyPressed := 0
+ EbeneAktualisieren()
+ PRVKBFSC02B := "PM3RU"
+}
+
+CharProcM3RU() {
+ global
+ if (isMod3LPressed)
+ CharStarUp("MOD3")
+ isMod3RPressed := 0
+ isMod3Pressed := isMod3LPressed
+ EbeneAktualisieren()
+}
+
+CharProcM4LD() {
+ global
+ wasMod4LPressed := isMod4LPressed
+ isMod4LPressed := 1
+ isMod4Pressed := 1
+ waswasNonShiftKeyPressed := wasNonShiftKeyPressed
+ wasNonShiftKeyPressed := 0
+ EbeneAktualisieren()
+ PRVKE2SC056 := "PM4LU"
+ if (isMod4RPressed and !wasMod4LPressed and !waswasNonShiftKeyPressed)
+ ToggleMod4Lock()
+}
+
+CharProcM4LU() {
+ global
+ isMod4LPressed := 0
+ isMod4Pressed := isMod4RPressed
+ EbeneAktualisieren()
+}
+
+CharProcM4RD() {
+ global
+ wasMod4RPressed := isMod4RPressed
+ isMod4RPressed := 1
+ isMod4Pressed := 1
+ waswasNonShiftKeyPressed := wasNonShiftKeyPressed
+ wasNonShiftKeyPressed := 0
+ EbeneAktualisieren()
+ PRVKA5SC138 := "PM4RU"
+ if (isMod4LPressed and !wasMod4RPressed and !waswasNonShiftKeyPressed)
+ ToggleMod4Lock()
+}
+
+CharProcM4RU() {
+ global
+ isMod4RPressed := 0
+ isMod4Pressed := isMod4LPressed
+ EbeneAktualisieren()
+}
+
SendUnicodeChar(charCode){
IfWinActive,ahk_class gdkWindowToplevel
{