diff options
author | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2009-05-12 19:31:19 +0000 |
---|---|---|
committer | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2009-05-12 19:31:19 +0000 |
commit | 87b89eb7f9db5d720ff18669a89290b76c8d26c7 (patch) | |
tree | 950fd3cebbf72949589162afd12b83dce25f66ea /windows/neo-vars/src | |
parent | 0884b26a70080e4b2351fe48642e501fb034a0c1 (diff) | |
download | neo-layout-87b89eb7f9db5d720ff18669a89290b76c8d26c7.tar.gz neo-layout-87b89eb7f9db5d720ff18669a89290b76c8d26c7.tar.bz2 neo-layout-87b89eb7f9db5d720ff18669a89290b76c8d26c7.zip |
Aufräumarbeiten: Ein paar Gosub-Style-Unterprogramme in Funktionen umgewandelt. Dadurch unnötig gewordene Quelldateien entfernt.
git-svn-id: https://svn.neo-layout.org@1839 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows/neo-vars/src')
-rw-r--r-- | windows/neo-vars/src/neo20-all.ahk | 2 | ||||
-rw-r--r-- | windows/neo-vars/src/source/initialize.ahk | 10 | ||||
-rw-r--r-- | windows/neo-vars/src/source/keyhooks.ahk | 3 | ||||
-rw-r--r-- | windows/neo-vars/src/source/neovarscompose.ahk | 32 | ||||
-rw-r--r-- | windows/neo-vars/src/source/tray.ahk | 117 | ||||
-rw-r--r-- | windows/neo-vars/src/source/trayfunctions.ahk | 74 |
6 files changed, 109 insertions, 129 deletions
diff --git a/windows/neo-vars/src/neo20-all.ahk b/windows/neo-vars/src/neo20-all.ahk index 047ac6f..dfa1335 100644 --- a/windows/neo-vars/src/neo20-all.ahk +++ b/windows/neo-vars/src/neo20-all.ahk @@ -8,7 +8,6 @@ SetWorkingDir, %A_ScriptDir% ; die Compose-Definitionen
#include *i source\compose.generated.ahk
#include *i source\compose-tainted.generated.ahk
-#include source\neovarscompose.ahk
#include source\compose-gen.ahk
; Hier liegt die Tastaturbelegung
@@ -41,7 +40,6 @@ SetWorkingDir, %A_ScriptDir% #include source\tray.ahk
#include source\keyhooks.ahk
-#include source\trayfunctions.ahk
#include source\levelfunctions.ahk
#include source\keyboardleds.ahk
diff --git a/windows/neo-vars/src/source/initialize.ahk b/windows/neo-vars/src/source/initialize.ahk index 86339c2..d6cacb0 100644 --- a/windows/neo-vars/src/source/initialize.ahk +++ b/windows/neo-vars/src/source/initialize.ahk @@ -34,7 +34,7 @@ disable=Deaktiviere %name% #LTrim ; Quelltext kann eingerückt werden
SetCapsLockState Off
-Gosub, SaveNumLockState
+SaveNumLockState()
SetNumLockState Off
OnExit, exitprogram
SetScrollLockState Off
@@ -93,6 +93,14 @@ IsMod4Pressed := 0 IsMod4Locked := 0
EbeneAktualisieren := "NEOEbeneAktualisieren"
+SaveNumLockState() {
+ global
+ if GetKeyState("NumLock","T")
+ SavedNumLockState = On
+ else
+ SavedNumLockState = Off
+}
+
%EbeneAktualisieren%()
ActivateLayOut(inputlocale)
diff --git a/windows/neo-vars/src/source/keyhooks.ahk b/windows/neo-vars/src/source/keyhooks.ahk index 3ef4945..1c1e1d3 100644 --- a/windows/neo-vars/src/source/keyhooks.ahk +++ b/windows/neo-vars/src/source/keyhooks.ahk @@ -6,7 +6,8 @@ +pause::
Suspend, Permit
- goto togglesuspend
+ Traytogglesuspend()
+return
;;;;;; DOWN EVENTS
diff --git a/windows/neo-vars/src/source/neovarscompose.ahk b/windows/neo-vars/src/source/neovarscompose.ahk deleted file mode 100644 index ad3ba61..0000000 --- a/windows/neo-vars/src/source/neovarscompose.ahk +++ /dev/null @@ -1,32 +0,0 @@ -/*
-CM* == 1: Await more compose chars after this sequence?
-CD* : Replace compose sequence by this character
-CPx* : Key press for * in Ebene x
-CPNx* : Key press for numpad * in Ebene x
-CS* : shortcut to output instead of *
-PP* : repeat code for key *
-PR* : release code for key *
-*/
-
-; ein wenig COMPOSE
-CMS__CompU00002D := 1
-CDS__CompU00002DS__Left := "U002190"
-CDS__CompU00002DS____Up := "U002191"
-CDS__CompU00002DS__Rght := "U002192"
-CDS__CompU00002DS__Down := "U002193"
-CDS__CompU00002DS__Home := "U002196"
-CDS__CompU00002DS__PgUp := "U002197"
-CDS__CompU00002DS__PgDn := "U002198"
-CDS__CompU00002DS___End := "U002199"
-CMS__CompU00003D := 1
-CDS__CompU00003DS__Left := "U0021D0"
-CDS__CompU00003DS____Up := "U0021D1"
-CDS__CompU00003DS__Rght := "U0021D2"
-CDS__CompU00003DS__Down := "U0021D3"
-CDS__CompU00003DS__Home := "U0021D6"
-CDS__CompU00003DS__PgUp := "U0021D7"
-CDS__CompU00003DS__PgDn := "U0021D8"
-CDS__CompU00003DS___End := "U0021D9"
-CDS__CompS__Comp := "U00266B"
-CDS__CompU00000D := "U00240D"
-CDS__CompS__NEnt := "U002318"
diff --git a/windows/neo-vars/src/source/tray.ahk b/windows/neo-vars/src/source/tray.ahk index db9186c..3eb327c 100644 --- a/windows/neo-vars/src/source/tray.ahk +++ b/windows/neo-vars/src/source/tray.ahk @@ -1,20 +1,99 @@ -menu,tray,icon,%ResourceFolder%\neo_enabled.ico,,1
-menu,tray,nostandard
-menu,tray,add,Öffnen,open
- menu,helpmenu,add,About,about
- menu,helpmenu,add,Autohotkey-Hilfe,help
- menu,helpmenu,add
- menu,helpmenu,add,http://autohotkey.com/,autohotkey
- menu,helpmenu,add,http://www.neo-layout.org/,neo
-menu,tray,add,Hilfe,:helpmenu
-menu,tray,add
-menu,tray,add,%disable%,togglesuspend
-menu,tray,add
-menu,tray,add,Bearbeiten,edit
-menu,tray,add,Neu Laden,reload
-menu,tray,add
-menu,tray,add,Nicht im Systray anzeigen,hide
-menu,tray,add,%name% beenden, exitprogram
-menu,tray,default,%disable%
-menu,tray,tip,%name%
+TrayAktivieren() {
+ global
+ menu,tray,icon,%ResourceFolder%\neo_enabled.ico,,1
+ menu,tray,nostandard
+ menu,tray,add,Öffnen,open
+ menu,helpmenu,add,About,about
+ menu,helpmenu,add,Autohotkey-Hilfe,help
+ menu,helpmenu,add
+ menu,helpmenu,add,http://autohotkey.com/,autohotkey
+ menu,helpmenu,add,http://www.neo-layout.org/,neo
+ menu,tray,add,Hilfe,:helpmenu
+ menu,tray,add
+ menu,tray,add,%disable%,togglesuspend
+ menu,tray,add
+ menu,tray,add,Bearbeiten,edit
+ menu,tray,add,Neu Laden,reload
+ menu,tray,add
+ menu,tray,add,Nicht im Systray anzeigen,hide
+ menu,tray,add,%name% beenden, exitprogram
+ menu,tray,default,%disable%
+ menu,tray,tip,%name%
+ return
+
+help:
+ Run, %A_WinDir%\hh mk:@MSITStore:autohotkey.chm
+return
+
+togglesuspend:
+ Traytogglesuspend()
+return
+
+about:
+ msgbox, 64, %name% Ergonomische Tastaturbelegung,
+ (
+ %name%
+ `nDas Neo-Layout ersetzt das übliche deutsche
+ Tastaturlayout mit der Alternative Neo,
+ beschrieben auf http://neo-layout.org/.
+ `nDazu sind keine Administratorrechte nötig.
+ `nWenn Autohotkey aktiviert ist, werden alle Tastendrucke
+ abgefangen und statt dessen eine Übersetzung weitergeschickt.
+ `nDies geschieht transparent für den Anwender,
+ es muss nichts installiert werden.
+ `nDie Zeichenübersetzung kann leicht über das Icon im
+ Systemtray deaktiviert werden. `n
+ )
+return
+
+neo:
+ run http://neo-layout.org/
+return
+
+autohotkey:
+ run http://autohotkey.com/
+return
+
+open:
+ ListLines ; shows the Autohotkey window
+return
+
+edit:
+ edit
+return
+
+reload:
+ Reload
+return
+
+hide:
+ menu, tray, noicon
+return
+
+exitprogram:
+ SetNumLockState, %SavedNumLockState%
+ exitapp
+return
+
+}
+
+Traytogglesuspend() {
+ global
+ if A_IsSuspended {
+ menu, tray, rename, %enable%, %disable%
+ menu, tray, tip, %name%
+ menu, tray, icon, %ResourceFolder%\neo_enabled.ico,,1
+ SaveNumLockState()
+ SetNumLockState Off
+ suspend, off ; Schaltet Suspend aus -> NEO
+ } else {
+ menu, tray, rename, %disable%, %enable%
+ menu, tray, tip, %name% : Deaktiviert
+ menu, tray, icon, %ResourceFolder%\neo_disabled.ico,,1
+ SetNumLockState, %SavedNumLockState%
+ suspend, on ; Schaltet Suspend ein -> QWERTZ
+ }
+}
+
+TrayAktivieren()
diff --git a/windows/neo-vars/src/source/trayfunctions.ahk b/windows/neo-vars/src/source/trayfunctions.ahk deleted file mode 100644 index 9d8951f..0000000 --- a/windows/neo-vars/src/source/trayfunctions.ahk +++ /dev/null @@ -1,74 +0,0 @@ -togglesuspend:
- if A_IsSuspended {
- menu, tray, rename, %enable%, %disable%
- menu, tray, tip, %name%
- menu, tray, icon, %ResourceFolder%\neo_enabled.ico,,1
- Gosub, SaveNumLockState
- SetNumLockState Off
- suspend, off ; Schaltet Suspend aus -> NEO
- } else {
- menu, tray, rename, %disable%, %enable%
- menu, tray, tip, %name% : Deaktiviert
- menu, tray, icon, %ResourceFolder%\neo_disabled.ico,,1
- SetNumLockState, %SavedNumLockState%
- suspend, on ; Schaltet Suspend ein -> QWERTZ
- }
-return
-
-help:
- Run, %A_WinDir%\hh mk:@MSITStore:autohotkey.chm
-return
-
-about:
- msgbox, 64, %name% Ergonomische Tastaturbelegung,
- (
- %name%
- `nDas Neo-Layout ersetzt das übliche deutsche
- Tastaturlayout mit der Alternative Neo,
- beschrieben auf http://neo-layout.org/.
- `nDazu sind keine Administratorrechte nötig.
- `nWenn Autohotkey aktiviert ist, werden alle Tastendrucke
- abgefangen und statt dessen eine Übersetzung weitergeschickt.
- `nDies geschieht transparent für den Anwender,
- es muss nichts installiert werden.
- `nDie Zeichenübersetzung kann leicht über das Icon im
- Systemtray deaktiviert werden. `n
- )
-return
-
-neo:
- run http://neo-layout.org/
-return
-
-autohotkey:
- run http://autohotkey.com/
-return
-
-open:
- ListLines ; shows the Autohotkey window
-return
-
-edit:
- edit
-return
-
-reload:
- Reload
-return
-
-hide:
- menu, tray, noicon
-return
-
-exitprogram:
- SetNumLockState, %SavedNumLockState%
- exitapp
-return
-
-SaveNumLockState:
- if GetKeyState("NumLock","T")
- SavedNumLockState = On
- else
- SavedNumLockState = Off
-return
-
|