From 8b936f90f30bafdf356862f3be2b5738097e7144 Mon Sep 17 00:00:00 2001 From: mösi Date: Sat, 1 Nov 2008 09:31:45 +0000 Subject: Unshifting verallgemeinert und auf LShift/RShift angepasst. git-svn-id: https://svn.neo-layout.org@1079 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/neo-vars/neo20-vars.ahk | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'windows') diff --git a/windows/neo-vars/neo20-vars.ahk b/windows/neo-vars/neo20-vars.ahk index ce5b917..e56ce3f 100644 --- a/windows/neo-vars/neo20-vars.ahk +++ b/windows/neo-vars/neo20-vars.ahk @@ -124,13 +124,13 @@ CharOut(char) { global if (DNCS%char% != "") { seq := DNCS%char% . UPCS%char% - if (isShiftPressed and (isMod2Locked or (char == "U00B4"))) - seq := "{Shift Up}" . seq . "{Shift Down}" + if (isShiftPressed and UNSH%char%) + seq := FixSeq(seq,isShiftLPressed,isShiftRPressed) send % "{blind}" . seq } else if (CS%char% != "") { seq := "{" . CS%char% . "}" - if (isShiftPressed and (isMod2Locked or (char == "U20AC"))) - seq := "{Shift Up}" . seq . "{Shift Down}" + if (isShiftPressed and UNSH%char%) + seq := FixSeq(seq,isShiftLPressed,isShiftRPressed) send % "{blind}" . seq } else SendUnicodeChar("0x" . SubStr(char,2)) @@ -140,14 +140,14 @@ CharOutDown(char) { global if (DNCS%char% != "") { seq := DNCS%char% - if (isShiftPressed and (isMod2Locked or (char == "U00B4"))) - seq := "{Shift Up}" . seq . "{Shift Down}" + if (isShiftPressed and UNSH%char%) + seq := FixSeq(seq,isShiftLPressed,isShiftRPressed) send % "{blind}" . seq } else if (CS%char% != "") { seq := CS%char% seq := "{". seq . " down}" - if (isShiftPressed and (isMod2Locked or (char == "U20AC"))) - seq := "{Shift Up}" . seq . "{Shift Down}" + if (isShiftPressed and UNSH%char%) + seq := FixSeq(seq,isShiftLPressed,isShiftRPressed) send % "{blind}" . seq } else SendUnicodeCharDown("0x" . SubStr(char,2)) @@ -157,19 +157,28 @@ CharOutUp(char) { global if (DNCS%char% != "") { seq := UPCS%char% - if (isShiftPressed and isMod2Locked) - seq := "{Shift Up}" . seq . "{Shift Down}" + if (isShiftPressed and UNSH%char%) + seq := FixSeq(seq,isShiftLPressed,isShiftRPressed) send % "{blind}" . seq } else if (CS%char% != "") { seq := CS%char% seq := "{". seq . " up}" - if (isShiftPressed and (isMod2Locked or (char == "U20AC"))) - seq := "{Shift Up}" . seq . "{Shift Down}" + if (isShiftPressed and UNSH%char%) + seq := FixSeq(seq,isShiftLPressed,isShiftRPressed) send % "{blind}" . seq } else SendUnicodeCharUp("0x" . SubStr(char,2)) } +FixSeq(seq,LP,RP) { + ret := seq + if (LP) + ret := "{Shift Up}" . ret . "{Shift Down}" + if (RP) + ret := "{RShift Up}" . ret . "{RShift Down}" + return ret +} + CharProc(subroutine) { global if (subroutine == "_Rom") { -- cgit v1.2.3