root/windows/autohotkey/neo20.ahk @ 749

Revision 749, 90.5 KB (checked in by dennis, 5 years ago)

? und ¿ funktionieren wieder (in Revision 746 war eine Klammer vergessen worden)

Line 
1/*
2*******************************************
3WICHTIGE WARNUNG:
4
5Dies ist inzwischen eine automatisch generierte
6Datei! Sie wird regelm��ig �berschrieben und
7sollte deshalb nicht mehr direkt bearbeitet werden!
8
9Alle weiterf�hrende Informationen finden sich im Abschnitt
10== Hinweise f�r Entwickler ==
11in der Datei README.txt! 
12*******************************************
13*/
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31/*
32*******************************************
33Das war die letzte WARNUNG, ich hoffe nur dass
34Sie wirklich wissen was Sie hier tun wollen ...
35*******************************************
36*/
37
38
39/************************************
40* NEO 2.0 (beta) AutoHotkey-Treiber *
41*************************************
42
43Autoren:
44Stefan Mayer <stm (at) neo-layout. o r g>
45Nora Gei�ler <nora_geissler (at) yahoo. d e>
46Matthias Berg <neo (at) matthias-berg. e u>
47Martin Roppelt <m.p.roppelt (at) web. d e>
48Dennis Heidsiek <HeidsiekB (at) aol. c o m>
49Matthias W�chter <matthias (at) waechter.wiz. a t>
50...
51
52*********
53* TODO: *
54*********
55- Compose vollst�ndig implementieren (Welche Methode ist hierzu am besten geeignet?)
56- ausgiebig testen... (besonders Vollst�ndigkeit bei Deadkeys)
57- Bessere L�sung f�r das Leeren von PriorDeadKey finden, damit die Sondertasten nicht mehr abgefangen werden m�ssen.
58- Testen, ob die Capslockl�sung (siehe *1:: ebene 1) auch f�r Numpad gebraucht wird
59- Die Ebenen vom Tastenblock an die neue Referenz anpassen (wenn da ein Konsens gefunden wurde)
60
61**********
62* IDEEN: *
63**********
64- Die Varianten (lernModus, einHandNeo, Lang-s-Tastatur, Qwertz/pausieren) sollten einheitlich (de-)aktiviert werden, etwa �ber M4+F9-F12
65
66******************
67* CHANGEHISTORY: *
68******************
69
70Revision 748 (von Dennis Heidsiek)
71- Neue Globale Variable �zeigeLockBoxen�: Soll mit MessageBoxen explizit auf das Ein- und Ausschalten des Mod{3,4}-Locks hingewiesen werden?
72Revision 746 (von Martin Roppelt)
73- Zur�cksetzen der Tastatur �ber M4+Esc
74- #(2L) sendet nicht mehr '
75- Variablen Ebene7 und Ebene8 zum Abfragen eingef�hrt
76- s(12)(2L)-Bug von Matthias W�chter behoben
77Revision 744 (von Stefan Mayer)
78- Ebene4-Ziffernblock: auf neo_d nun Komma (wie Referenz), "NumPadKomma" gibt es nicht
79Revision 743 (von Matthias W�chter, commit durch Stefan Mayer)
80- Ebene4-Ziffernblock: NumPadAdd und NumPadSub korrigiert
81Revision 740 (von Matthias W�chter, commit durch HCW)
82- "Mega-Patch" (Skript verk�rzt, Ebenenabfrage ver�ndert, ...), siehe CHANGES.txt
83- Blinde tote Tasten auf M4+F9 (Toggle)
84- Blinde Compose auf M4+F10 (Toggle)
85Revision 728 (von Dennis Heidsiek):
86- Ist die Datei %APPDATA%\NEO2\NEO2.ini vorhanden, werden dort eventuell vorhandene Werte f�r die Globalen Schalter beim Start �bernommen
87- �LangSTastaturStandardm��igEingeschaltet.ahk� wird nicht mehr unterst�tzt, weil sonst immer neu kompiliert werden muss
88Revision 707 (von Dennis Heidsiek):
89- Die Resourcen-Dateien (PNGs, ICOs) werden nun nach %TEMP%\NEO2\ extrahiert und nicht mehr in das Verzeichnis, in dem sich die EXE befindet
90- Die doppelten franz�sischen Anf�hrungszeichen werden nun ebenfalls �ber SendUnicodeChar gesendet
91Revision 694 (von Martin Roppelt):
92- LangSTastatur auf M4+F11
93- Entwickler k�nnen durch das Erstellen einer Datei �LangSTastaturStandardm��igEingeschaltet.ahk� mit dem Inhalt �LangSTastatur := 1� diese standardm��ig aktivieren
94- Mehrere DeadKeys aktualisiert (T*, Ebene 4 und T*, Ebene 5)
95Revision 687 (von Dennis Heidsiek):
96- Die SendUnicodeChar-Methode um den GDK-Workarround von Matthias W�chter erg�nzt
97- (An/Aus) Icons an Favicon der neuen Homepage angepasst
98Revision 645 (von Martin Roppelt):
99- Ellipse zus�tzlich auf M3+x
100- Lang-s-Tastatur probeweise auf M4+Esc
101Revision 640 (von Dennis Heidsiek):
102- Der untote Zirkumflex (^) auf Ebene 3 funktioniert jetzt auch in Java-Programmen
103Revision 639 (von Martin Roppelt):
104- Lang-s-Tastatur kann nicht mehr durch einen Hotkey aktiviert werden
105Revision 629 (von Martin Roppelt):
106- Spitze Klammern (bra und ket) auf M5+8/9
107Revision 624 (von Martin Roppelt):
108- Lang-s-Tastatur (ein- und auszuschalten durch Mod4+�)
109Revision 616 (von Dennis Heidsiek):
110- Der nicht funktionierende Mod5-Lock-Fix wurde wieder entfernt, da er sogar neue Fehler produzierte
111Revision 615 (von Dennis Heidsiek):
112- Erfolgloser Versuch, den Mod4-Lock wiederherzustellen (durch eine Tilde vor den Scancodes der Bildschirmtastatur)
113- Rechtschreibfehler korrigiert
114- Zwei AHK-Links eingef�gt
115Revision 609 (von Dennis Heidsiek):
116- Vorl�ufiger Abschluss der AHK-Modularisierung
117- Bessere Testm�glichkeit �All.ahk� f�r AHK-Entwickler hinzugef�gt, bei der sich die Zeilenangaben in Fehlermeldungen auf die tats�chlichen Module und nicht auf das gro�e �vereinigte� Skript beziehen
118Revision 608 (von Martin Roppelt):
119- Rechtschreibfehler korrigiert und Dateinamen aktualisiert und sortiert
120Revision 590 (von Dennis Heidsiek):
121- Erste technische Vorarbeiten zur logischen Modularisierung des viel zu lange gewordenen AHK-Quellcodes
122- Neue Batch-Datei Build-Update.bat zur einfachen Aktualisierung der EXE-Datei
123Revision 583 (von Dennis Heidsiek):
124- Kleinere Korrekturen (M3+NP5, M5+NP5 und M3+NP9 stimmen wieder mit der Referenz �berein)
125Revision 580 (von Matthias Berg):
126- Bildschirmtastatur jetzt mit Mod4+F* statt Strg+F*, dies deaktiviert jedoch leider den Mod4-Lock
127Revision 570 (von Matthias Berg):
128- Hotkeys f�r einHandNeo und lernModus durch entsprechende ScanCodes ersetzt
129Revision 568 (von Matthias Berg):
130- Sonderzeichen, Umlaute, z und y durch ScanCodes ersetzt
131  * jetzt wird auch bei eingestelltem US Layout Neo verwendet (z.B. f�r Chinesische InputMethodEditors)
132  * rechter Mod3 geht noch nicht bei US-Layout (weder ScanCode noch "\")
133Revision 567 (von Dennis Heidsiek):
134- Aktivierter Mod4-Lock wird jetzt �ber die Rollen-LED des Keybord angezeigt (analog zu CapsLock), die Num-LED beh�lt ihr bisheriges Verhalten
135- Neue Option im Skript: UseMod4Light
136Revision 561 (von Matthias Berg):
137- M4+Tab verh�lt sich jetzt wie das andere Tab dank "goto neo_tab"
138Revision 560 (von Dennis Heidsiek):
139- Neue Option im Skript: bildschirmTastaturEinbinden bindet die PNG-Bilder der Bildschirmtastur mit in die exe-Datei ein, so dass sich der Benutzer nur eine Datei herunterladen muss
140Revision 559 (von Matthias Berg):
141- Shift+Alt+Tab Problem gel�st (muss noch mehr auf Nebeneffekte getestet werden)
142Revision 558 (von Matthias Berg):
143- Icon-Bug behoben
144  * Hotkeys d�rfen nicht vor der folgenden Zeile stehen:
145   "menu, tray, icon, neo.ico,,1"
146- lernModus-Konfigurations-Bug behoben: or statt and(not)
147- Ein paar leere Else-F�lle eingebaut (Verst�ndlichkeit, m�gliche Compilerprobleme vermeiden)   
148Revision 556 (von Matthias Berg):
149- lernModus (an/aus mit Strg+Komma)
150  * im Skript konfigurierbar
151  * Schaltet z.B. Qwertz Tasten aus, die es auf der 4. Ebene gibt (Return, Backspace,...)
152  * Kann auch Backspace und/oder Entfernen der 4. Ebene ausschalten (gut zum Lernen, richtig zu schreiben)
153- Bug aufgetaucht: Icons werden nicht mehr angezeigt
154Revision 544 (von Stefan Mayer):
155- ,.:; auf dem Mod4-Ziffernblock an die aktuelle Referenz angepasst
156- Versionen von rho, theta, kappa und phi an die aktuelle Referenz angepasst
157Revision 542 (von Matthias Berg):
158- bei EinHandNeo ist jetzt Space+y auch Mod4
159- AltGr-Bug  hoffentlich wieder behoben. Diesmal mit extra altGrPressed Variable
160- nurEbenenFuenfUndSechs umbenannt in ahkTreiberKombi und auf Ebene 4 statt 5 und 6 ge�ndert
161Revision 540 (von Matthias Berg):
162- stark �berarbeitet um Wartbarkeit zu erh�hen und Redundanz zu verringern
163- nurEbenenFuenfUndSechs sollte nun auch auf Neo Treiber statt Qwertz laufen
164  * aber es muss noch jemand testen
165  * Problem: was kann man abfangen, wenn eine tote Taste gedr�ckt wird
166- einHandNeo:
167  * An-/Ausschalten mit Strg+Punkt
168  * Buchstaben der rechten Hand werden mit Space zur linken Hand
169  * Nebeneffekt: es gibt beim Festhalten von Space keine wiederholten Leerzeichen mehr
170Revision 532 (von Matthias Berg):
171- BildschirmTastatur
172  * aktiviert mit Strg+F1 bis 7, schaltet Keyboard ein oder aus
173  * Strg+F7 zeigt die zuletzt angezeigte Ebene an (und wieder aus)
174  * Strg+F8 schaltet AlwaysOnTop um   
175Revision 529 (von Stefan Mayer):
176- Icon wird automatisch geladen, falls .ico-Dateien im selbem Ordner
177- In der .exe sind die .ico mitgespeichert und werden geladen
178Revision 528 (von Matthias Berg):
179- Neo-Icon
180- Neo-Prozess jetzt automatisch auf hoher Prioritaet
181  (siehe globale Schalter)
182- Mod3-Lock (nur wenn rechtes Mod3 zuerst gedr�ckt wird, andere L�sung f�hrte zum Caps-Bug)
183- Mod4-Lock (nur wenn das linke Mod4 zuerst gedr�ckt wird, andere L�sung f�hrte zum AltGr-Bug)
184- Ein paar falsche Zeichen korrigiert
185Revision 527 (von Matthias Berg):
186- AltGr-Problem hoffentlich behoben
187- Umschalt+Mod4-Bug behoben
188Revision 526 (von Matthias Berg):
189- Ebenen 1 bis 4 ausschalten per Umschalter siehe erste Codezeile nurEbenenFuenfUndSechs = 0
190- Mod4-Lock durch Mod4+Mod4
191- EbenenAktualisierung neu geschrieben
192- Ebene 6 �ber Mod3+Mod4
193- Ebenen (besonders Matheebene) an Referenz angepasst (allerdings kaum um Ebenen 1&2 gek�mmert, besonders Compose k�nnte noch �berholt werden)
194Revision 525 (von Matthias Berg):
195- Capslock bei Zahlen und Sonderzeichen ber�cksichtigt
196Revision 524 (von Matthias Berg):
197- umgekehrtes ^ f�r o, a, �,i  sowie f�r die grossen vokale ( 3. ton chinesisch)
198  � damit wird jetzt PinYin vollst�ndig unterst�tzt caron, macron, akut, grave auf uiaeo�
199- Sonderzeichen senden wieder blind -> Shortcuts funktionieren, Capslock ist leider Shiftlock
200Revision 523 (von Matthias Berg):
201- CapsLock geht jetzt auch bei allen Zeichen ('send Zeichen' statt 'send {blind} Zeichen')
202- vertikale Ellipse eingebaut
203- Umschalt+Umschalt f�r Capslock statt Mod3+Mod3
204- bei Suspend wird jetzt wirklich togglesuspend aufgerufen (auch beim Aktivieren per shift+pause)
205Revsion 490 (von Stefan Mayer):
206- SUBSCRIPT von 0 bis 9 sowie (auf Ziffernblock) + und -
207  � auch bei Ziffernblock auf der 5. Ebene
208- Kein Parsen �ber die Zwischenablage mehr
209- Vista-kompatibel
210- Compose-Taste
211  � Br�che (auf Zahlenreihe und Hardware-Ziffernblock)
212  � r�mische Zahlen
213  � Ligaturen und Copyright
214*/
215
216
217
218/****************
219* Verzeichnisse *
220*****************
221*/
222; Setzt den Pfad zu einem tempor�ren Verzeichnis
223EnvGet, WindowsEnvTempFolder, TEMP
224ResourceFolder = %WindowsEnvTempFolder%\NEO2
225FileCreateDir, %ResourceFolder%
226
227; Setzt den Pfad zu den NEO-Anwendungsdateien
228EnvGet, WindowsEnvAppDataFolder, APPDATA
229ApplicationFolder = %WindowsEnvAppDataFolder%\NEO2
230FileCreateDir, %ApplicationFolder%
231
232
233
234/*******************
235* Globale Schalter *
236********************
237*/
238
239; Im folgenden gilt (soweit nicht anders angegeben) Ja = 1, Nein = 0:
240; Syntaxhinweis: IniRead, Variable, InputFilename, Section, Key [, DefaultValue]
241
242; Sollen die Bilder f�r die Bildschirmtastatur in die compilierte EXE-Datei miteingebunden werden? (Nachteil: gr�ssere Dateigr�sse, Vorteil: Referenz f�r Anf�nger stets einfach verf�gbar)
243bildschirmTastaturEinbinden := 1
244
245; Sollen Ebenen 1-4 ignoriert werden (kann z.B. vom dll Treiber �bernommen werden)?
246IniRead, ahkTreiberKombi, %ApplicationFolder%\NEO2.ini, Global, ahkTreiberKombi, 0
247
248; Soll der Treiber im Einhandmodus betrieben werden?
249IniRead, einHandNeo, %ApplicationFolder%\NEO2.ini, Global, einHandNeo, 0
250
251; Soll der Lernmodus aktiviert werden?
252IniRead, lernModus, %ApplicationFolder%\NEO2.ini, Global, lernModus, 0
253
254; Soll mit MessageBoxen explizit auf das Ein- und Ausschalten des Mod{3,4}-Locks hingewiesen werden?
255IniRead, zeigeLockBoxen, %ApplicationFolder%\NEO2.ini, Global, zeigeLockBoxen, 1
256
257; Soll aktivierter Mod4-Lock �ber die Rollen-LED des Keybord angezeigt werden (analog zu CapsLock)?
258IniRead, UseMod4Light, %ApplicationFolder%\NEO2.ini, Global, UseMod4Light, 1
259
260; Soll Lang-s auf s, s auf � und � auf Lang-s gelegt (bzw. vertauscht) werden?
261IniRead, LangSTastatur, %ApplicationFolder%\NEO2.ini, Global, LangSTastatur, 0
262
263; Sollen tote Tasten blind angezeigt werden?
264IniRead, DeadCompose, %ApplicationFolder%\NEO2.ini, Global, DeadCompose, 0
265
266;Sollen Compose-Tasten blind angezeigt werden?
267IniRead, DeadSilence, %ApplicationFolder%\NEO2.ini, Global, DeadSilence, 0
268
269
270/***********************
271* Recourcen-Verwaltung *
272************************
273*/
274
275if(FileExist("ResourceFolder") <> false) {
276  ; Versuche, alle m�glicherweise in die EXE eingebundenen Dateien zu extrahieren
277  FileInstall, neo.ico, %ResourceFolder%\neo.ico, 1
278  FileInstall, neo_disabled.ico, %ResourceFolder%\neo_disabled.ico, 1
279  iconBenutzen = 1
280  if (bildschirmTastaturEinbinden==1) {
281    FileInstall, ebene1.png, %ResourceFolder%\ebene1.png, 1
282    FileInstall, ebene2.png, %ResourceFolder%\ebene2.png, 1
283    FileInstall, ebene3.png, %ResourceFolder%\ebene3.png, 1
284    FileInstall, ebene4.png, %ResourceFolder%\ebene4.png, 1
285    FileInstall, ebene5.png, %ResourceFolder%\ebene5.png, 1
286    FileInstall, ebene6.png, %ResourceFolder%\ebene6.png, 1
287    zeigeBildschirmTastatur = 1
288  }
289} else {
290  MsgBox, "Das Verzeichnis %ResourceFolder% konnte nicht angelegt werden!" ; Diese Zeile dient nur der eventuellen Fehlersuche und sollte eigentlich niemals auftauchen.
291}
292
293; Benutze die Dateien auch dann, wenn sie eventuell im aktuellen Verzeichnis vorhanden sind
294if ( FileExist("ebene1.png") && FileExist("ebene2.png") && FileExist("ebene3.png") && FileExist("ebene4.png") && FileExist("ebene5.png") && FileExist("ebene6.png") )
295  zeigeBildschirmTastatur = 1
296if ( FileExist("neo.ico") && FileExist("neo_disabled.ico") )
297  iconBenutzen = 1
298
299
300/**************************
301* lernModus Konfiguration *
302* nur relevant wenn       *
303* lernModus = 1           *
304* Strg+Komma schaltet um  *
305***************************
306*/
307; 0 = aus, 1 = an
308
309; die Nachfolgenden sind n�tzlich um sich die Qwertz-Tasten abzugew�hnen, da alle auf der 4. Ebene vorhanden.
310lernModus_std_Return = 0
311lernModus_std_Backspace = 0
312lernModus_std_PgUp = 0
313lernModus_std_PgDn = 0
314lernModus_std_Einf = 0
315lernModus_std_Entf = 0
316lernModus_std_Pos0 = 0
317lernModus_std_Ende = 0
318lernModus_std_Hoch = 0
319lernModus_std_Runter = 0
320lernModus_std_Links = 0
321lernModus_std_Rechts = 0
322lernModus_std_ZahlenReihe = 0
323
324; im folgenden kann man auch noch ein paar Tasten der 4. Ebene deaktivieren
325; n�tzlich um sich zu zwingen, richtig zu schreiben
326lernModus_neo_Backspace = 0
327lernModus_neo_Entf = 1
328
329; aus Noras Skript kopiert:
330Process,Priority,,High
331#usehook on
332#singleinstance force
333#LTrim
334  ; Quelltext kann einger�ckt werden,
335  ; msgbox ist trotzdem linksb�ndig
336SetTitleMatchMode 2
337SendMode Input 
338name    = Neo 2.0
339enable  = Aktiviere %name%
340disable = Deaktiviere %name%
341
342; �berpr�fung auf deutsches Tastaturlayout
343; ----------------------------------------
344
345regread, inputlocale, HKEY_CURRENT_USER, Keyboard Layout\Preload, 1
346regread, inputlocalealias, HKEY_CURRENT_USER
347     , Keyboard Layout\Substitutes, %inputlocale%
348if inputlocalealias <>
349   inputlocale = %inputlocalealias%
350if inputlocale <> 00000407
351{
352  suspend   
353  regread, inputlocale, HKEY_LOCAL_MACHINE
354    , SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%
355    , Layout Text
356  msgbox, 48, Warnung!,
357    (
358    Nicht kompatibles Tastaturlayout:   
359    `t%inputlocale%   
360    `nDas deutsche QWERTZ muss als Standardlayout eingestellt 
361    sein, damit %name% wie erwartet funktioniert.   
362    `n�ndern Sie die Tastatureinstellung unter
363    `tSystemsteuerung   
364    `t-> Regions- und Sprachoptionen   
365    `t-> Sprachen
366    `t-> Details...   `n
367    )
368  exitapp
369}
370
371
372; Men� des Systray-Icons
373; ----------------------
374
375if (iconBenutzen)
376  menu, tray, icon, %ResourceFolder%\neo.ico,,1
377menu, tray, nostandard
378menu, tray, add, �ffnen, open
379  menu, helpmenu, add, About, about
380  menu, helpmenu, add, Autohotkey-Hilfe, help
381  menu, helpmenu, add
382  menu, helpmenu, add, http://&autohotkey.com/, autohotkey
383  menu, helpmenu, add, http://www.neo-layout.org/, neo
384menu, tray, add, Hilfe, :helpmenu
385menu, tray, add
386menu, tray, add, %disable%, togglesuspend
387menu, tray, default, %disable%
388menu, tray, add
389menu, tray, add, Edit, edit
390menu, tray, add, Reload, reload
391menu, tray, add
392menu, tray, add, Nicht im Systray anzeigen, hide
393menu, tray, add, %name% beenden, exitprogram
394menu, tray, tip, %name%
395
396
397/*
398  Variablen initialisieren
399*/
400
401DeadKey = ""
402CompKey = ""
403PriorDeadKey = ""
404PriorCompKey = ""
405Ebene12 = 0
406
407EbeneAktualisieren()
408
409
410/*
411  EinHandNeo
412*/
413spacepressed := 0
414keypressed:= 0
415
416; Reihe 1
417gespiegelt_7 = neo_6
418gespiegelt_8 = neo_5
419gespiegelt_9 = neo_4
420gespiegelt_0 = neo_3
421gespiegelt_strich = neo_2
422gespiegelt_tot2 = neo_1
423
424; Reihe 2
425gespiegelt_k = neo_w
426gespiegelt_h = neo_c
427gespiegelt_g = neo_l
428gespiegelt_f = neo_v
429gespiegelt_q = neo_x
430gespiegelt_sz = neo_tab
431gespiegelt_tot3 = neo_tot1
432
433; Reihe 3
434gespiegelt_s = neo_o
435gespiegelt_n = neo_e
436gespiegelt_r = neo_a
437gespiegelt_t = neo_i
438gespiegelt_d = neo_u
439
440; Reihe 4
441gespiegelt_b = neo_z
442gespiegelt_m = neo_p
443gespiegelt_komma = neo_�
444gespiegelt_punkt = neo_�
445gespiegelt_j = neo_�
446
447
448;Blinde/Sichtbare Tote Tasten
449*F9::
450  if (isMod4pressed())
451    DeadSilence :=  not(DeadSilence)
452  else
453    send {blind}{F9}
454return
455
456;Blinde/Sichtbare Compose
457*F10::
458  if (isMod4pressed())
459    DeadCompose :=  not(DeadCompose)
460  else
461    send {blind}{F10}
462return
463
464;Lang-s-Tastatur:
465*F11::
466  if (isMod4pressed())
467    LangSTastatur := not(LangSTastatur) ; schaltet die Lang-s-Tastatur ein und aus
468  else
469    send {blind}{F11}
470return
471
472*Esc::
473  if (isMod4pressed())
474    reload
475  else
476    send {blind}{Esc}
477return
478/*
479   ------------------------------------------------------
480   Modifier
481   ------------------------------------------------------
482*/
483
484
485;LShift+RShift == CapsLock (simuliert)
486; Es werden nur die beiden Tastenkombinationen abgefragt,
487; daher kommen LShift und RShift ungehindert bis in die
488; Applikation. Dies ist aber merkw�rdig, da beide Shift-
489; Tasten nun /modifier keys/ werden und, wie in der AHK-
490; Hilfe beschrieben, eigentlich nicht mehr bis zur App
491; durchkommen sollten.
492
493VKA1SC136 & VKA0SC02A:: ; RShift, dann LShift
494VKA0SC02A & VKA1SC136:: ; LShift, dann RShift
495;
496; mit diesen funktioniert das automatische �bernehmen der
497; gedr�ckten Shift-Tasten nicht, also z.B. Shift-Ins, wenn Ins
498; bei gedr�ckter Shift-Taste {blind} gesendet wird
499; *VKA1SC136::
500; *VKA0SC02A::
501   if (GetKeyState("VKA1SC136", "P") and GetKeyState("VKA0SC02A", "P"))
502      send {blind}{CapsLock}
503return
504
505
506; Mod3+Mod3 == Mod3-Lock
507; Im Gegensatz zu LShift+RShift werden die beiden Tasten
508; _nicht_ zur Applikation weitergeleitet, da '#' kein
509; Modifier ist und CapsLock sonst den CapsLock-Status
510; beeinflusst. Daf�r werden s�mtliche Events dieser
511; Tasten abgefangen, und nur bei gleichzeitigem Dr�cken
512; wird der Mod3-Lock aktiviert und angezeigt.
513
514IsMod3Locked := 0
515; VKBFSC02B & VK14SC03A::
516; VK14SC03A & VKBFSC02B::
517*VKBFSC02B:: ; #
518*VK14SC03A:: ; CapsLock
519   if (GetKeyState("VKBFSC02B", "P") and GetKeyState("VK14SC03A", "P"))
520   {
521      if (IsMod3Locked)
522      {
523         IsMod3Locked = 0
524         if (zeigeLockBoxen==1)
525         {
526            MsgBox Mod3-Feststellung aufgebehoben!
527         }
528      }
529      else
530      {
531         IsMod3Locked = 1
532         if (zeigeLockBoxen==1)
533         {
534            MsgBox Mod3 festgestellt: Um Mod3 wieder zu l�sen dr�cke beide Mod3 Tasten gleichzeitig!
535         }
536         
537      }
538   }
539return
540
541; Mod4+Mod4 == Mod4-Lock
542; Wie bei Mod3-Lock werden im Gegensatz zu LShift+RShift
543; die beiden Tasten _nicht_ zur Applikation weitergeleitet,
544; und nur bei gleichzeitigem Dr�cken wird der Mod4-Lock
545; aktiviert und angezeigt.
546
547IsMod4Locked := 0
548; VKA5SC138 & VKE2SC056:: ; AltGr, dann <
549; VKE2SC056 & VKA5SC138:: ; <, dann AltGr
550*VKA5SC138::
551*VKE2SC056::
552   if (GetKeyState("VKA5SC138", "P") and GetKeyState("VKE2SC056", "P"))
553   {
554      ; Mod4-Lock durch Mod4(rechts)+Mod4(links)
555      if (IsMod4Locked)
556      {
557         if (zeigeLockBoxen==1)
558         {
559            MsgBox Mod4-Feststellung aufgebehoben!
560         }
561         IsMod4Locked = 0
562         if (UseMod4Light==1)
563         {
564            KeyboardLED(1,"off")
565         }
566      }
567      else
568      {
569         if (zeigeLockBoxen==1)
570         {
571            MsgBox Mod4 festgestellt: Um Mod4 wieder zu l�sen dr�cke beide Mod3 Tasten gleichzeitig!
572         }
573         IsMod4Locked = 1
574         if (UseMod4Light==1)
575         {
576            KeyboardLED(1,"on")
577         }
578      }
579   }
580return
581/*
582   ------------------------------------------------------
583   QWERTZ->Neo umwandlung
584   ------------------------------------------------------
585*/
586; Reihe 1
587*VKDCSC029::goto neo_tot1  ; Zirkumflex ^
588*VK31SC002::goto neo_1
589*VK32SC003::goto neo_2
590*VK33SC004::goto neo_3
591*VK34SC005::goto neo_4
592*VK35SC006::goto neo_5
593*VK36SC007::goto neo_6
594*VK37SC008::
595     if( not(einHandNeo) or not(spacepressed) )
596       goto neo_7
597     else
598      {
599        keypressed := 1
600        goto %gespiegelt_7%
601      }
602*VK38SC009::
603     if( not(einHandNeo) or not(spacepressed) )
604       goto neo_8
605     else
606      {
607        keypressed := 1
608        goto %gespiegelt_8%
609      }
610*VK39SC00A::
611     if( not(einHandNeo) or not(spacepressed) )
612       goto neo_9
613     else
614      {
615        keypressed := 1
616        goto %gespiegelt_9%
617      }
618*VK30SC00B::
619     if( not(einHandNeo) or not(spacepressed) )
620       goto neo_0
621     else
622      {
623        keypressed := 1
624        goto %gespiegelt_0%
625      }
626*VKDBSC00C:: ; �
627  if ( not(ahkTreiberKombi) )
628  {
629       if( not(einHandNeo) or not(spacepressed) )
630       goto neo_strich
631     else
632      {
633        keypressed := 1
634        goto %gespiegelt_strich%
635      }
636   }
637  else
638  {
639     goto neo_sz   
640  }
641*VKDDSC00D::goto neo_tot2  ; Akut                       
642; Reihe 2
643VK09SC00F::goto neo_tab
644*VK51SC010:: ; q (x)
645  if ( not(ahkTreiberKombi) )
646  {
647     goto neo_x
648  }
649  else
650  {
651     goto neo_q   
652  }
653*VK57SC011:: ; w (v)
654  if ( not(ahkTreiberKombi) )
655  {
656     goto neo_v
657  }
658  else
659  {
660     goto neo_w   
661  }
662*VK45SC012:: ; e (l)
663  if ( not(ahkTreiberKombi) )
664  {
665     goto neo_l
666  }
667  else
668  {
669     goto neo_e   
670  }
671*VK52SC013:: ; r (c)
672  if ( not(ahkTreiberKombi) )
673  {
674     goto neo_c
675  }
676  else
677  {
678     goto neo_r   
679  }
680*VK54SC014:: ; t (w)
681  if ( not(ahkTreiberKombi) )
682  {
683     goto neo_w
684  }
685  else
686  {
687     goto neo_t   
688  }
689*VK5ASC015:: ; z (k)
690  if ( not(ahkTreiberKombi) )
691  {
692     if( not(einHandNeo) or not(spacepressed) )
693       goto neo_k
694     else
695      {
696        keypressed := 1
697        goto %gespiegelt_k%
698      }
699  }
700  else
701  {
702     goto neo_z   
703  }
704*VK55SC016:: ; u (h)
705  if ( not(ahkTreiberKombi) )
706  {
707     if( not(einHandNeo) or not(spacepressed) )
708       goto neo_h
709     else
710      {
711        keypressed := 1
712        goto %gespiegelt_h%
713      }
714  }
715  else
716  {
717     goto neo_u   
718  }
719*VK49SC017:: ; i (g)
720  if ( not(ahkTreiberKombi) )
721  {
722     if( not(einHandNeo) or not(spacepressed) )
723       goto neo_g
724     else
725      {
726        keypressed := 1
727        goto %gespiegelt_g%
728      }
729  }
730  else
731  {
732     goto neo_i   
733  }
734*VK4FSC018:: ; o (f)
735  if ( not(ahkTreiberKombi) )
736  {
737     if( not(einHandNeo) or not(spacepressed) )
738       goto neo_f
739     else
740      {
741        keypressed := 1
742        goto %gespiegelt_f%
743      }
744  }
745  else
746  {
747     goto neo_o   
748  }
749*VK50SC019:: ; p (q)
750  if ( not(ahkTreiberKombi) )
751  {
752     if( not(einHandNeo) or not(spacepressed) )
753       goto neo_q
754     else
755      {
756        keypressed := 1
757        goto %gespiegelt_q%
758      }
759  }
760  else
761  {
762     goto neo_p   
763  }
764*VKBASC01A:: ; � (�)
765  if ( not(ahkTreiberKombi) )
766  {
767     if( not(einHandNeo) or not(spacepressed) )
768       goto neo_sz
769     else
770      {
771        keypressed := 1
772        goto %gespiegelt_sz%
773      }
774  }
775  else
776  {
777     goto neo_�   
778  }
779*VKBBSC01B:: ; + (tot3)
780  if ( not(ahkTreiberKombi) )
781  {
782     if( not(einHandNeo) or not(spacepressed) )
783       goto neo_tot3
784     else
785      {
786        keypressed := 1
787        goto %gespiegelt_tot3%
788      }
789  }
790  else
791  { } ; this should never happen
792
793; Reihe 3
794*VK41SC01E:: ; a (u)
795  if ( not(ahkTreiberKombi) )
796  {
797     goto neo_u
798  }
799  else
800  {
801     goto neo_a   
802  }
803*VK53SC01F:: ; s (i)
804  if ( not(ahkTreiberKombi) )
805  {
806     goto neo_i
807  }
808  else
809  {
810     goto neo_s   
811  }
812*VK44SC020:: ; d (a)
813  if ( not(ahkTreiberKombi) )
814  {
815     goto neo_a
816  }
817  else
818  {
819     goto neo_d   
820  }
821*VK46SC021:: ; f (e)
822  if ( not(ahkTreiberKombi) )
823  {
824     goto neo_e
825  }
826  else
827  {
828     goto neo_f   
829  }
830*VK47SC022:: ; g (o)
831  if ( not(ahkTreiberKombi) )
832  {
833     goto neo_o
834  }
835  else
836  {
837     goto neo_g   
838  }
839*VK48SC023:: ; h (s)
840  if ( not(ahkTreiberKombi) )
841  {
842     if( not(einHandNeo) or not(spacepressed) )
843       goto neo_s
844     else
845      {
846        keypressed := 1
847        goto %gespiegelt_s%
848      }
849  }
850  else
851  {
852     goto neo_h   
853  }
854*VK4ASC024:: ; j (n)
855  if ( not(ahkTreiberKombi) )
856  {
857     if( not(einHandNeo) or not(spacepressed) )
858       goto neo_n
859     else
860      {
861        keypressed := 1
862        goto %gespiegelt_n%
863      }
864  }
865  else
866  {
867     goto neo_j   
868  }
869*VK4BSC025:: ; k (r)
870  if ( not(ahkTreiberKombi) )
871  {
872     if( not(einHandNeo) or not(spacepressed) )
873       goto neo_r
874     else
875      {
876        keypressed := 1
877        goto %gespiegelt_r%
878      }
879  }
880  else
881  {
882     goto neo_k   
883  }
884*VK4CSC026:: ; l (t)
885  if ( not(ahkTreiberKombi) )
886  {
887     if( not(einHandNeo) or not(spacepressed) )
888       goto neo_t
889     else
890      {
891        keypressed := 1
892        goto %gespiegelt_t%
893      }
894  }
895  else
896  {
897     goto neo_l   
898  }
899*VKC0SC027:: ; � (d)
900  if ( not(ahkTreiberKombi) )
901  {
902     if( not(einHandNeo) or not(spacepressed) )
903       goto neo_d
904     else
905      {
906        keypressed := 1
907        goto %gespiegelt_d%
908      }
909  }
910  else
911  {
912     goto neo_�   
913  }
914*VKDESC028:: ; � (y)
915  if ( not(ahkTreiberKombi) )
916  {
917     goto neo_y
918  }
919  else
920  {
921     goto neo_�
922  }
923
924; Reihe 4
925*VK59SC02C:: ; y (�)
926  if ( not(ahkTreiberKombi) )
927  {
928     goto neo_�
929  }
930  else
931  {
932     goto neo_y   
933  }
934*VK58SC02D:: ; x (�)
935  if ( not(ahkTreiberKombi) )
936  {
937     goto neo_�
938  }
939  else
940  {
941     goto neo_x   
942  }
943*VK43SC02E:: ; c (�)
944  if ( not(ahkTreiberKombi) )
945  {
946     goto neo_�
947  }
948  else
949  {
950     goto neo_c
951  }
952*VK56SC02F:: ; v (p)
953  if ( not(ahkTreiberKombi) )
954  {
955     goto neo_p
956  }
957  else
958  {
959     goto neo_v
960  }
961*VK42SC030:: ; b (z)
962  if ( not(ahkTreiberKombi) )
963  {
964     goto neo_z
965  }
966  else
967  {
968     goto neo_b
969  }
970*VK4ESC031:: ; n (b)
971  if ( not(ahkTreiberKombi) )
972  {
973     if( not(einHandNeo) or not(spacepressed) )
974       goto neo_b
975     else
976      {
977        keypressed := 1
978        goto %gespiegelt_b%
979      }
980  }
981  else
982  {
983     goto neo_n
984  }
985*VK4DSC032:: ; m (m)
986     if( not(einHandNeo) or not(spacepressed) )
987       goto neo_m
988     else
989      {
990        keypressed := 1
991        goto %gespiegelt_m%
992      }
993*VKBCSC033:: ; , (,)
994     if( not(einHandNeo) or not(spacepressed) )
995       goto neo_komma
996     else
997      {
998        keypressed := 1
999        goto %gespiegelt_komma%
1000      }
1001*VKBESC034:: ; . (.)
1002     if( not(einHandNeo) or not(spacepressed) )
1003       goto neo_punkt
1004     else
1005      {
1006        keypressed := 1
1007        goto %gespiegelt_punkt%
1008      }
1009*VKBDSC035:: ; - (j)
1010  if ( not(ahkTreiberKombi) )
1011  {
1012     if( not(einHandNeo) or not(spacepressed) )
1013       goto neo_j
1014     else
1015      {
1016        keypressed := 1
1017        goto %gespiegelt_j%
1018      }
1019  }
1020  else
1021  {
1022     goto neo_strich
1023  }
1024
1025; Numpad
1026*VK6FSC135::goto neo_NumpadDiv
1027*VK6ASC037::goto neo_NumpadMult
1028*VK6DSC04A::goto neo_NumpadSub
1029*VK6BSC04E::goto neo_NumpadAdd
1030*VK0DSC11C::goto neo_NumpadEnter
1031
1032*VK67SC047::                      ; NumPad7    (mit NumLock  und ohne Shift)
1033*VK24SC047::goto neo_Numpad7      ; NumPadHome (ohne Numlock oder mit Shift)
1034
1035*VK68SC048::                      ; NumPad8    (mit NumLock  und ohne Shift)
1036*VK26SC048::goto neo_Numpad8      ; NumPadUp   (ohne Numlock oder mit Shift)
1037
1038*VK69SC049::                      ; NumPad9    (mit NumLock  und ohne Shift)
1039*VK21SC049::goto neo_Numpad9      ; NumPadPgUp (ohne Numlock oder mit Shift)
1040
1041*VK64SC04B::                      ; NumPad4    (mit NumLock  und ohne Shift)
1042*VK25SC04B::goto neo_Numpad4      ; NumPadLeft (ohne Numlock oder mit Shift)
1043
1044*VK65SC04C::                      ; NumPad5    (mit NumLock  und ohne Shift)
1045*VK0CSC04C::goto neo_Numpad5      ; NumPadClear(ohne Numlock oder mit Shift)
1046
1047*VK66SC04D::                      ; NumPad6    (mit NumLock  und ohne Shift)
1048*VK27SC04D::goto neo_Numpad6      ; NumPadRight(ohne Numlock oder mit Shift)
1049
1050*VK61SC04F::                      ; NumPad1    (mit NumLock  und ohne Shift)
1051*VK23SC04F::goto neo_Numpad1      ; NumPadEnd  (ohne Numlock oder mit Shift)
1052
1053*VK62SC050::                      ; NumPad2    (mit NumLock  und ohne Shift)
1054*VK28SC050::goto neo_Numpad2      ; NumPadDown (ohne Numlock oder mit Shift)
1055
1056*VK63SC051::                      ; NumPad3    (mit NumLock  und ohne Shift)
1057*VK22SC051::goto neo_Numpad3      ; NumPadPgDn (ohne Numlock oder mit Shift)
1058
1059*VK60SC052::                      ; NumPad0    (mit NumLock  und ohne Shift)
1060*VK2DSC052::goto neo_Numpad0      ; NumPadIns  (ohne Numlock oder mit Shift)
1061
1062*VK6ESC053::                      ; NumPadDot  (mit NumLock  und ohne Shift)
1063*VK2ESC053::goto neo_NumpadDot    ; NumPadIns  (ohne Numlock oder mit Shift)
1064/*
1065Die eigentliche NEO-Belegung und der Hauptteil des AHK-Treibers.
1066
1067  Ablauf bei toten Tasten:
1068  1. Ebene Aktualisieren
1069  2. Abh�ngig von der Variablen "Ebene" Zeichen ausgeben und die Variable "PriorDeadKey" setzen
1070
1071  Ablauf bei "untoten" Tasten:
1072  1. Ebene Aktualisieren
1073  2. Abh�ngig von den Variablen "Ebene" und "PriorDeadKey" Zeichen ausgeben
1074  3. "PriorDeadKey" mit leerem String �berschreiben
1075
1076  Reihe 1
1077*/
1078
1079
1080neo_tot1:
1081  EbeneAktualisieren()
1082  if (Ebene = 1)
1083  {
1084    deadUni(0x02C6) ; Zirkumflex, tot
1085    DeadKey := "c1"
1086  }
1087  else if (Ebene = 2)
1088  {
1089    deadUni(0x02C7) ; Caron, tot
1090    DeadKey := "c2"
1091  }
1092  else if (Ebene = 3)
1093  {
1094    deadUni(0x02D8) ; Brevis, tot
1095    DeadKey := "c3"
1096  }
1097  else if (Ebene = 4)
1098  {
1099    deadUni(0x00B7) ; Mittenpunkt, tot
1100    DeadKey := "c4"
1101  }
1102  else if (Ebene = 5)
1103  {
1104    deadAsc("-")    ; Querstrich, tot
1105    DeadKey := "c5"
1106  }
1107  else if (Ebene = 6)
1108  {
1109    deadAsc(".")    ; Punkt drunter (Colon), tot
1110    DeadKey := "c6"
1111  }
1112  CompKey := PriorCompKey
1113return
1114
1115neo_1:
1116  EbeneAktualisieren()
1117  if (Ebene = 1)
1118  {
1119    if !(CheckDeadUni("c1",0x00B9)
1120      or CheckDeadUni("c5",0x2081)
1121      or CheckComp3Uni("r_1",0x217A)     ; r�misch xi
1122      or CheckComp3Uni("R_1",0x216A))    ; r�misch XI
1123      if (GetKeyState("CapsLock","T"))
1124        send {blind}{Shift down}1{Shift up}
1125      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1126        send {blind}1
1127
1128      if      (PriorDeadKey = "comp")
1129         CompKey := "1"
1130      else if (PriorCompKey == "r")
1131         CompKey := "r_1"
1132      else if (PriorCompKey == "R")
1133         CompKey := "R_1"
1134   }
1135   else if (Ebene = 2)
1136      send �
1137   else if (Ebene = 3)
1138      SendUnicodeChar(0x00B9) ; 2 Hochgestellte
1139   else if (Ebene = 4)
1140      SendUnicodeChar(0x2022) ; bullet
1141   else if (Ebene = 5)
1142      SendUnicodeChar(0x2640) ; Piktogramm weiblich
1143   else if (Ebene = 6)
1144      SendUnicodeChar(0x00AC) ; Nicht-Symbol
1145return
1146
1147neo_2:
1148  EbeneAktualisieren()
1149  if (Ebene = 1)
1150  {
1151    if !(CheckDeadUni("c1",0x00B2)
1152      or CheckDeadUni("c5",0x2082)
1153      or CheckCompUni("r",0x2171)      ; r�misch ii
1154      or CheckCompUni("R",0x2161)      ; r�misch II
1155      or CheckComp3Uni("r_1",0x217B)   ; r�misch xii
1156      or CheckComp3Uni("R_1",0x216B))  ; r�misch XII
1157      if (GetKeyState("CapsLock","T"))
1158        send {blind}{Shift down}2{Shift up}
1159      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1160        send {blind}2
1161
1162    if (PriorDeadKey = "comp")
1163      CompKey := "2"
1164  }
1165  else if (Ebene = 2)
1166    SendUnicodeChar(0x2116) ; numero
1167  else if (Ebene = 3)
1168    SendUnicodeChar(0x00B2) ; 2 Hochgestellte
1169  else if (Ebene = 4)
1170    SendUnicodeChar(0x2023) ; aufzaehlungspfeil
1171  else if (Ebene = 5)
1172    SendUnicodeChar(0x26A5) ; Piktogramm Zwitter
1173  else if (Ebene = 6)
1174    SendUnicodeChar(0x2228) ; Logisches Oder
1175return
1176
1177neo_3:
1178  EbeneAktualisieren()
1179  if (Ebene = 1)
1180  {
1181    if !(CheckDeadUni("c1",0x00B3)
1182      or CheckDeadUni("c5",0x2083)
1183      or CheckCompUni("1",0x2153)        ; 1/3
1184      or CheckCompUni("2",0x2154)        ; 2/3
1185      or CheckCompUni("r",0x2172)        ; r�misch iii
1186      or CheckCompUni("R",0x2162))       ; r�misch III
1187      if (GetKeyState("CapsLock","T"))
1188        send {blind}{Shift down}3{Shift up}
1189      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1190        send {blind}3
1191
1192    if (PriorDeadKey = "comp")
1193      CompKey := "3"
1194  }
1195  else if (Ebene = 2)
1196    send �
1197  else if (Ebene = 3)
1198    SendUnicodeChar(0x00B3) ; 3 Hochgestellte
1199  else if (Ebene = 4)
1200  {
1201     CompKey := PriorCompKey
1202     DeadKey := PriorDeadKey
1203  } ; leer
1204  else if (Ebene = 5)
1205    SendUnicodeChar(0x2642) ; Piktogramm Mann
1206  else if (Ebene = 6)
1207    SendUnicodeChar(0x2227) ; Logisches Und
1208return
1209
1210neo_4:
1211  EbeneAktualisieren()
1212  if (Ebene = 1)
1213  {
1214    if !(CheckDeadUni("c1",0x2074)
1215      or CheckDeadUni("c5",0x2084)
1216      or CheckCompUni("r",0x2173)    ; r�misch iv
1217      or CheckCompUni("R",0x2163))   ; r�misch IV
1218      if (GetKeyState("CapsLock","T"))
1219        send {blind}{Shift down}4{Shift up}
1220      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1221        send {blind}4
1222
1223    if (PriorDeadKey = "comp")
1224      CompKey := "4"
1225  }
1226  else if (Ebene = 2)
1227    SendUnicodeChar(0x00BB) ; �, Double guillemot right
1228   else if (Ebene = 3)
1229    Send {blind}�           ; Single guillemot right
1230  else if (Ebene = 4)
1231    Send {blind}{PgUp}      ; Prev
1232  else if (Ebene = 5)
1233    SendUnicodeChar(0x2113) ; Script small L
1234  else if (Ebene = 6)
1235    SendUnicodeChar(0x22A5) ; Senkrecht
1236return
1237
1238neo_5:
1239  EbeneAktualisieren()
1240  if (Ebene = 1)
1241  {
1242    if !(CheckDeadUni("c1",0x2075)
1243      or CheckDeadUni("c5",0x2085)
1244      or CheckCompUni("1",0x2155)        ; 1/5
1245      or CheckCompUni("2",0x2156)        ; 2/5
1246      or CheckCompUni("3",0x2157)        ; 3/5
1247      or CheckCompUni("4",0x2158)        ; 4/5
1248      or CheckCompUni("r",0x2174)        ; r�misch v
1249      or CheckCompUni("R",0x2164))       ; r�misch V
1250      if (GetKeyState("CapsLock","T"))
1251        send {blind}{Shift down}5{Shift up}
1252      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1253        send {blind}5
1254
1255    if (PriorDeadKey = "comp")
1256      CompKey := "5"
1257  }
1258  else if (Ebene = 2)
1259    SendUnicodeChar(0x00AB) ; Double guillemot left
1260  else if (Ebene = 3)
1261    Send {blind}�           ; Single guillemot left
1262  else if (Ebene = 4)
1263  {
1264     CompKey := PriorCompKey
1265     DeadKey := PriorDeadKey
1266  } ; leer
1267  else if (Ebene = 5)
1268    SendUnicodeChar(0x2020) ; Kreuz (Dagger)
1269  else if (Ebene = 6)
1270    SendUnicodeChar(0x2221) ; Winkel
1271return
1272
1273neo_6:
1274  EbeneAktualisieren()
1275  if (Ebene = 1)
1276  {
1277    if !(CheckDeadUni("c1",0x2076)
1278      or CheckDeadUni("c5",0x2086)
1279      or CheckCompUni("1",0x2159)        ; 1/6
1280      or CheckCompUni("5",0x215A)        ; 5/6
1281      or CheckCompUni("r",0x2175)        ; r�misch vi
1282      or CheckCompUni("R",0x2165))       ; r�misch VI
1283      if (GetKeyState("CapsLock","T"))
1284        send {blind}{Shift down}6{Shift up}
1285      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1286        send {blind}6
1287
1288    if (PriorDeadKey = "comp")
1289      CompKey := "6"
1290  }
1291  else if (Ebene = 2)
1292    send �
1293  else if (Ebene = 3)
1294    send {blind}�
1295  else if (Ebene = 4)
1296    send {blind}�
1297  else if (Ebene = 5)
1298  {
1299     CompKey := PriorCompKey
1300     DeadKey := PriorDeadKey
1301  } ; leer
1302  else if (Ebene = 6)
1303    SendUnicodeChar(0x2225) ; parallel
1304return
1305
1306neo_7:
1307  EbeneAktualisieren()
1308  if (Ebene = 1)
1309  {
1310    if !(CheckDeadUni("c1",0x2077)
1311      or CheckDeadUni("c5",0x2087)
1312      or CheckCompUni("r",0x2176)    ; r�misch vii
1313      or CheckCompUni("R",0x2166))   ; r�misch VII
1314      if (GetKeyState("CapsLock","T"))
1315        send {blind}{Shift down}7{Shift up}
1316      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1317        send {blind}7
1318
1319    if (PriorDeadKey = "comp")
1320      CompKey := "7"
1321  }
1322  else if (Ebene = 2)
1323    send $
1324  else if (Ebene = 3)
1325    send {blind}�
1326  else if (Ebene = 4)
1327    send {blind}�
1328  else if (Ebene = 5)
1329    SendUnicodeChar(0x03BA) ; greek small letter kappa
1330  else if (Ebene = 6)
1331    SendUnicodeChar(0x2209) ; nicht Element von
1332return
1333
1334neo_8:
1335  EbeneAktualisieren()
1336  if (Ebene = 1)
1337  {
1338    if !(CheckDeadUni("c1",0x2078)
1339      or CheckDeadUni("c5",0x2088)
1340      or CheckCompUni("1",0x215B)        ; 1/8
1341      or CheckCompUni("3",0x215C)        ; 3/8
1342      or CheckCompUni("5",0x215D)        ; 5/8
1343      or CheckCompUni("7",0x215E)        ; 7/8
1344      or CheckCompUni("r",0x2177)        ; r�misch viii
1345      or CheckCompUni("R",0x2167))       ; r�misch VIII
1346      if (GetKeyState("CapsLock","T"))
1347        send {blind}{Shift down}8{Shift up}
1348      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1349        send {blind}8
1350
1351    if (PriorDeadKey = "comp")
1352      CompKey := "8"
1353  }
1354  else if (Ebene = 2)
1355    send �
1356  else if (Ebene = 3)
1357    send {blind}�
1358  else if (Ebene = 4)
1359    Send {blind}{NumpadDiv}
1360  else if (Ebene = 5)
1361    SendUnicodeChar(0x27E8) ;bra (�ffnende spitze klammer)
1362  else if (Ebene = 6)
1363    SendUnicodeChar(0x2204) ; es existiert nicht
1364return
1365
1366neo_9:
1367  EbeneAktualisieren()
1368  if (Ebene = 1)
1369  {
1370    if !(CheckDeadUni("c1",0x2079)
1371      or CheckDeadUni("c5",0x2089)
1372      or CheckCompUni("r",0x2178)    ; r�misch ix
1373      or CheckCompUni("R",0x2168))   ; r�misch IX
1374      if (GetKeyState("CapsLock","T"))
1375        send {blind}{Shift down}9{Shift up}
1376      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1377        send {blind}9
1378
1379    if (PriorDeadKey = "comp")
1380      CompKey := "9"
1381  }
1382  else if (Ebene = 2)
1383    send �
1384  else if (Ebene = 3)
1385    send {blind}�
1386  else if (Ebene = 4)
1387    Send {blind}{NumpadMult}
1388  else if (Ebene = 5)
1389    SendUnicodeChar(0x27E9) ;ket (schlie�ende spitze klammer)
1390  else if (Ebene = 6)
1391    SendUnicodeChar(0x2226) ; nicht parallel
1392return
1393
1394neo_0:
1395  EbeneAktualisieren()
1396  if (Ebene = 1)
1397  {
1398    if !(CheckDeadUni("c1",0x2070)
1399      or CheckDeadUni("c5",0x2080)
1400      or CheckComp3Uni("r_1",0x2179)    ; r�misch x
1401      or CheckComp3Uni("R_1",0x2169))   ; r�misch X
1402      if (GetKeyState("CapsLock","T"))
1403        send {blind}{Shift down}0{Shift up}
1404      else if (not(lernModus) or lernModus_std_ZahlenReihe)
1405        send {blind}0
1406
1407      if (PriorDeadKey = "comp")
1408         CompKey := "0"
1409   }
1410   else if (Ebene = 2)
1411      send �
1412   else if (Ebene = 3)
1413      send {blind}�
1414   else if (Ebene = 4)
1415      Send {blind}{NumpadSub}
1416   else if (Ebene = 5)
1417   {
1418       CompKey := PriorCompKey
1419       DeadKey := PriorDeadKey
1420   } ; leer
1421   else if (Ebene = 6)
1422      SendUnicodeChar(0x2205) ; leere Menge
1423return
1424
1425neo_strich:
1426  EbeneAktualisieren()
1427  if (Ebene = 1)
1428    if (GetKeyState("CapsLock","T"))
1429      send {blind}{Shift down}-{Shift up}
1430    else
1431      send {blind}-         ; Bindestrich-Minus
1432  else if (Ebene = 2)
1433    SendUnicodeChar(0x2013) ; Gedankenstrich
1434  else if (Ebene = 3)
1435    SendUnicodeChar(0x2014) ; Englischer Gedankenstrich (Geviertstrich)
1436  else if (Ebene = 4)
1437  {
1438     CompKey := PriorCompKey
1439     DeadKey := PriorDeadKey
1440  } ; leer
1441  else if (Ebene = 5)
1442    SendUnicodeChar(0x2011) ; gesch�tzter Bindestrich (Bindestrich ohne Zeilenumbruch)
1443  else if (Ebene = 6)
1444    SendUnicodeChar(0x00AD) ; weicher Bindestrich
1445return
1446
1447neo_tot2:
1448  EbeneAktualisieren()
1449  if (Ebene = 1)
1450  {
1451    deadAsc("{�}{space}") ; Akut, tot
1452    DeadKey := "a1"
1453  }
1454  else if (Ebene = 2)
1455  {
1456    deadAsc("``{space}")  ; Gravis, tot
1457    DeadKey := "a2"
1458  }
1459  else if (Ebene = 3)
1460  {
1461    deadAsc("�")          ; Cedilla, tot
1462    DeadKey := "a3"
1463  }
1464  else if (Ebene = 4)
1465  {
1466    deadUni(0x02D9)       ; Punkt obendr�ber
1467    DeadKey := "a4"
1468  }
1469  else if (Ebene = 5)
1470  {
1471    deadUni(0x02DB)       ; Ogonek
1472    DeadKey := "a5"
1473  }
1474  else if (Ebene = 6)
1475  {
1476    deadUni(0x02DA)       ; Ring obendrauf
1477    DeadKey := "a6"
1478  }
1479  CompKey := PriorCompKey
1480return
1481
1482
1483/*
1484
1485  Reihe 2
1486
1487*/
1488
1489neo_x:
1490  EbeneAktualisieren()
1491  if (Ebene12)
1492    OutputChar("x","X")
1493  else if (Ebene = 3)
1494    SendUnicodeChar(0x2026) ;Ellipse
1495  else if (Ebene = 5)
1496    SendUnicodeChar(0x03BE) ;xi
1497  else if (Ebene = 6)
1498    SendUnicodeChar(0x039E)  ; Xi
1499return
1500
1501
1502neo_v:
1503  EbeneAktualisieren()
1504  if (Ebene12 and !(CheckDeadUni12("c6",0x1E7F,0x1E7E)))
1505    OutputChar("v","V")
1506  else if (Ebene = 3)
1507    send {blind}_
1508  else if (Ebene = 4)
1509    if (not(lernModus) or lernModus_neo_Backspace)
1510      Send {blind}{Backspace}
1511    else
1512    {
1513       CompKey := PriorCompKey
1514       DeadKey := PriorDeadKey
1515    } ; leer
1516  else if (Ebene = 6)
1517    SendUnicodeChar(0x2259) ; estimates
1518return
1519
1520
1521
1522neo_l:
1523  EbeneAktualisieren()
1524  if (Ebene12 and !(CheckDeadUni12("a1",0x013A,0x0139)
1525            or CheckDeadUni12("a3",0x013C,0x013B)
1526            or CheckDeadUni12("c2",0x013E,0x013D)
1527            or CheckDeadUni12("c4",0x0140,0x013F)
1528            or CheckDeadUni12("c6",0x1E37,0x1E36)
1529            or CheckDeadUni12("t4",0x0142,0x0141)))
1530    OutputChar("l","L")
1531  else if (Ebene = 3)
1532    send {blind}[
1533  else if (Ebene = 4)
1534    Send {Blind}{Up}
1535  else if (Ebene = 5)
1536    SendUnicodeChar(0x03BB) ; lambda
1537  else if (Ebene = 6)
1538    SendUnicodeChar(0x039B) ; Lambda
1539return
1540
1541
1542neo_c:
1543  EbeneAktualisieren()
1544  if (Ebene12 and !(CheckDeadUni12("a1",0x0107,0x0106)
1545            or CheckDeadUni12("a3",0x00E7,0x00E6)
1546            or CheckDeadUni12("a4",0x010B,0x010A)
1547            or CheckDeadUni12("c1",0x0109,0x0108)
1548            or CheckDeadUni12("c2",0x010D,0x010C)
1549            or CheckCompAsc12("o","�","�")
1550            or CheckCompAsc12("O","�","�")))
1551    OutputChar("c","C")
1552  else if (Ebene = 3)
1553    send {blind}]
1554  else if (Ebene = 4)
1555    if (not(lernModus) or lernModus_neo_Entf)
1556      Send {blind}{Del}
1557    else
1558    {
1559       CompKey := PriorCompKey
1560       DeadKey := PriorDeadKey
1561    } ; leer
1562  else if (Ebene = 5)
1563    SendUnicodeChar(0x03C7) ;chi
1564  else if (Ebene = 6)
1565    SendUnicodeChar(0x2102)  ; C (Komplexe Zahlen)
1566return
1567
1568neo_w:
1569  EbeneAktualisieren()
1570  if (Ebene12 and !(CheckDeadUni12("c1",0x0175,0x0174)))
1571    OutputChar("w","W")
1572  else if (Ebene = 3)
1573    SendUnicodeChar(0x005E) ; untotes ^ - Unicode-Name: CIRCUMFLEX ACCENT
1574      ;send {^}{space}      ; Funktioniert nicht unter Java-Programmen
1575  else if (Ebene = 4)
1576    Send {blind}{Insert}
1577  else if (Ebene = 5)
1578    SendUnicodeChar(0x03C9) ; omega
1579  else if (Ebene = 6)
1580    SendUnicodeChar(0x03A9) ; Omega
1581return
1582
1583neo_k:
1584  EbeneAktualisieren()
1585  if (Ebene12 and !(CheckDeadUni12("a3",0x0137,0x0136)
1586            or CheckDeadUni12("c6",0x1E33,0x1E32)))
1587    OutputChar("k","K")
1588  else if (Ebene = 3)
1589    send {blind}{!}
1590  else if (Ebene = 4)
1591    Send �
1592  else if (Ebene = 5)
1593    SendUnicodeChar(0x03F0) ;kappa symbol (varkappa)
1594  else if (Ebene = 6)
1595    SendUnicodeChar(0x221A) ; Wurzel
1596return
1597
1598neo_h:
1599  EbeneAktualisieren()
1600  if (Ebene12 and !(CheckDeadUni12("a4",0x1E23,0x1E22)
1601            or CheckDeadUni12("c1",0x0125,0x0124)
1602            or CheckDeadUni12("c5",0x0127,0x0126)
1603            or CheckDeadUni12("c6",0x1E25,0x1E24)))
1604    OutputChar("h","H")
1605  else if ((Ebene = 3) and !(CheckDeadUni("c5",0x2264))) ; kleiner gleich
1606    send {blind}<
1607  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2077)
1608                  or CheckDeadUni("c5",0x2087)))
1609    Send {blind}{NumPad7}
1610  else if (Ebene = 5)
1611    SendUnicodeChar(0x03C8) ;psi
1612  else if (Ebene = 6)
1613    SendUnicodeChar(0x03A8)  ; Psi
1614return
1615
1616neo_g:
1617  EbeneAktualisieren()
1618  if (Ebene12 and !(CheckDeadUni12("a3",0x0123,0x0122)
1619            or CheckDeadUni12("a4",0x0121,0x0120)
1620            or CheckDeadUni12("c1",0x011D,0x011C)
1621            or CheckDeadUni12("c3",0x011F,0x011E)))
1622    OutputChar("g","G")
1623  else if ((Ebene = 3) and !(CheckDeadUni("c5",0x2265))) ; gr��er gleich
1624    send {blind}>
1625  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2078)
1626                  or CheckDeadUni("c5",0x2088)))
1627    Send {blind}{NumPad8}
1628  else if (Ebene = 5)
1629    SendUnicodeChar(0x03B3) ;gamma
1630  else if (Ebene = 6)
1631    SendUnicodeChar(0x0393)  ; Gamma
1632return
1633
1634neo_f:
1635  EbeneAktualisieren()
1636  if (Ebene12 and !(CheckDeadUni12("a4",0x1E1F,0x1E1E)
1637            or CheckDeadUni12("t4",0x0192,0x0191)))
1638    OutputChar("f","F")
1639  else if ((Ebene = 3) and !(CheckDeadUni("a6",0x2257)   ; ring equal to
1640               or CheckDeadUni("c1",0x2259)   ; entspricht
1641               or CheckDeadUni("c2",0x225A)   ; EQUIANGULAR TO
1642               or CheckDeadUni("c5",0x2261)   ; identisch
1643               or CheckDeadUni("t1",0x2245)   ; ungef�hr gleich
1644               or CheckDeadUni("t4",0x2260)))  ; ungleich
1645    send {blind}`=
1646  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2079)
1647                  or CheckDeadUni("c5",0x2089)))
1648    Send {blind}{NumPad9}
1649  else if (Ebene = 5)
1650    SendUnicodeChar(0x03C6) ; phi
1651  else if (Ebene = 6)
1652    SendUnicodeChar(0x03A6)  ; Phi
1653return
1654
1655neo_q:
1656   EbeneAktualisieren()
1657   if (Ebene12)
1658      OutputChar("q","Q")
1659   else if (Ebene = 3)
1660      send {blind}{&}
1661   else if ((Ebene = 4) and !(CheckDeadUni("c1",0x207A)
1662                           or CheckDeadUni("c5",0x208A)))
1663      Send {blind}{NumPadAdd}
1664   else if (Ebene = 5)
1665      SendUnicodeChar(0x03D5) ; phi symbol (varphi)
1666   else if (Ebene = 6)
1667      SendUnicodeChar(0x211A) ; Q (rationale Zahlen)
1668return
1669
1670neo_sz:
1671  EbeneAktualisieren()
1672  if (Ebene = 1)
1673    if (GetKeyState("CapsLock","T"))
1674      SendUnicodeChar(0x1E9E) ; versal-�
1675    else if (LangSTastatur = 1)
1676      send {blind}s
1677    else
1678      send �
1679  else if (Ebene = 2)
1680    if (GetKeyState("CapsLock","T"))
1681      if (LangSTastatur = 1)
1682        send {blind}s
1683      else
1684        send �
1685    else
1686      SendUnicodeChar(0x1E9E) ; versal-�
1687  else if (Ebene = 3)
1688    if (LangSTastatur = 1)
1689      send �
1690    else
1691      SendUnicodeChar(0x017F) ; langes s
1692  else if (Ebene = 5)
1693    SendUnicodeChar(0x03C2) ; varsigma
1694  else if (Ebene = 6)
1695    SendUnicodeChar(0x2218) ; Verkn�pfungsoperator
1696return
1697
1698
1699neo_tot3:
1700  EbeneAktualisieren()
1701  if (Ebene = 1)
1702  {
1703    deadUni(0x02DC)  ;Tilde, tot
1704    DeadKey := "t1"
1705  }
1706  else if (Ebene = 2)
1707  {
1708    deadUni(0x00AF)  ; Macron, tot
1709    DeadKey := "t2"
1710  }
1711  else if (Ebene = 3)
1712  {
1713    deadUni(0x00A8)  ; Di�rese
1714    DeadKey := "t3"
1715  }
1716  else if (Ebene = 4)
1717  {
1718    deadUni(0x002F)  ; Schr�gstrich, tot
1719    DeadKey := "t4"
1720  }
1721  else if (Ebene = 5)
1722  {
1723    deadUni(0x02DD)  ;Doppelakut
1724    DeadKey := "t5"
1725  }
1726  else if (Ebene = 6)
1727  {
1728    deadUni(0x02CF)  ; Komma drunter, tot
1729    DeadKey := "t6"
1730  }
1731
1732return
1733
1734
1735/*
1736
1737  Reihe 3
1738
1739*/
1740
1741neo_u:
1742  EbeneAktualisieren()
1743  if (Ebene12 and !(CheckDeadUni12("a1",0x00FA,0x00DA)
1744            or CheckDeadUni12("a2",0x00F9,0x00D9)
1745            or CheckDeadUni12("a5",0x0173,0x0172)
1746            or CheckDeadUni12("a6",0x016F,0x016E)
1747            or CheckDeadUni12("c1",0x00FB,0x00DB)
1748            or CheckDeadUni12("c2",0x01D4,0x01D3)
1749            or CheckDeadUni12("c3",0x016D,0x016C)
1750            or CheckDeadUni12("t1",0x0169,0x0168)
1751            or CheckDeadUni12("t2",0x016B,0x016A)
1752            or CheckDeadAsc12("t3","�","�")
1753            or CheckDeadUni12("t5",0x0171,0x0170)))
1754    OutputChar("u","U")
1755  else if (Ebene = 3)
1756    send {blind}\
1757  else if (Ebene = 4)
1758    Send {blind}{Home}
1759  else if (Ebene = 5)
1760  {
1761     CompKey := PriorCompKey
1762     DeadKey := PriorDeadKey
1763  } ; leer
1764  else if (Ebene = 6)
1765    SendUnicodeChar(0x222E) ; contour integral
1766return
1767
1768neo_i:
1769  EbeneAktualisieren()
1770  if (Ebene12 and !(CheckDeadUni12("a1",0x00ED,0x00CD)
1771            or CheckDeadUni12("a2",0x00EC,0x00CC)
1772            or CheckDeadUni12("a4",0x012F,0x012E)
1773            or CheckDeadUni12("a5",0x0131,0x0130)
1774            or CheckDeadUni12("c1",0x00EE,0x00CE)
1775            or CheckDeadUni12("c2",0x01D0,0x01CF)
1776            or CheckDeadUni12("c3",0x012D,0x012C)
1777            or CheckDeadUni12("t1",0x0129,0x0128)
1778            or CheckDeadUni12("t2",0x012B,0x012A)
1779            or CheckDeadAsc12("t3","�","�")))
1780    OutputChar("i","I")
1781  else if (Ebene = 3)
1782    send {blind}`/
1783  else if (Ebene = 4)
1784    Send {Blind}{Left}
1785  else if (Ebene = 5   )
1786    SendUnicodeChar(0x03B9) ; iota
1787  else if (Ebene = 6)
1788    SendUnicodeChar(0x222B) ; integral
1789return
1790
1791neo_a:
1792  EbeneAktualisieren()
1793  if (Ebene12 and !(CheckDeadUni12("a1",0x00E1,0x00C1)
1794            or CheckDeadUni12("a2",0x00E0,0x00C0)
1795            or CheckDeadUni12("a5",0x0105,0x0104)
1796            or CheckDeadAsc12("a6","�","�")
1797            or CheckDeadUni12("c1",0x00E2,0x00C2)
1798            or CheckDeadUni12("c2",0x01CE,0x01CD)
1799            or CheckDeadUni12("c3",0x0103,0x0102)
1800            or CheckDeadUni12("t1",0x00E3,0x00C3)
1801            or CheckDeadUni12("t2",0x0101,0x0100)
1802            or CheckDeadAsc12("t3","�","�")))
1803    OutputChar("a","A")
1804  else if (Ebene = 3)
1805    send {blind}{{}
1806  else if (Ebene = 4)
1807    Send {Blind}{Down}
1808  else if (Ebene = 5)
1809    SendUnicodeChar(0x03B1) ;alpha
1810  else if (Ebene = 6)
1811    SendUnicodeChar(0x2200) ;f�r alle
1812return
1813
1814neo_e:
1815  EbeneAktualisieren()
1816  if (Ebene12 and !(CheckDeadUni12("a1",0x00E9,0x00C9)
1817            or CheckDeadUni12("a2",0x00E8,0x00C8)
1818            or CheckDeadUni12("a4",0x0117,0x0116)
1819            or CheckDeadUni12("a5",0x0119,0x0118)
1820            or CheckDeadUni12("c1",0x00EA,0x00CA)
1821            or CheckDeadUni12("c2",0x011B,0x011A)
1822            or CheckDeadUni12("c3",0x0115,0x0114)
1823            or CheckDeadUni12("t2",0x0113,0x0112)
1824            or CheckDeadAsc12("t3","�","�")
1825            or CheckCompAsc12("a","�","�")
1826            or CheckCompAsc12("A","�","�")
1827            or CheckCompAsc12("o","�","�")
1828            or CheckCompAsc12("O","�","�")))
1829    OutputChar("e","E")
1830  else if (Ebene = 3)    ; {
1831    send {blind}{}}
1832  else if (Ebene = 4)
1833    Send {Blind}{Right}
1834  else if (Ebene = 5)
1835      SendUnicodeChar(0x03B5) ;epsilon
1836  else if (Ebene = 6)
1837      SendUnicodeChar(0x2203) ;es existiert
1838return
1839
1840neo_o:
1841  EbeneAktualisieren()
1842  if (Ebene12 and !(CheckDeadUni12("a1",0x00F3,0x00D3)
1843            or CheckDeadUni12("a2",0x00F2,0x00D2)
1844            or CheckDeadUni12("a5",0x01EB,0x01EA)
1845            or CheckDeadUni12("c1",0x00F4,0x00D4)
1846            or CheckDeadUni12("c2",0x01D2,0x01D1)
1847            or CheckDeadUni12("c3",0x014F,0x014E)
1848            or CheckDeadUni12("t1",0x00F5,0x00D5)
1849            or CheckDeadUni12("t2",0x014D,0x014C)
1850            or CheckDeadAsc12("t3","�","�")
1851            or CheckDeadUni12("t4",0x00F8,0x00D8)
1852            or CheckDeadUni12("t5",0x0151,0x0150)))
1853    OutputChar("o","O")
1854  else if (Ebene = 3)
1855    send {blind}*
1856  else if (Ebene = 4)
1857    Send {blind}{End}
1858  else if (Ebene = 5)
1859    SendUnicodeChar(0x03BF) ; omicron
1860  else if (Ebene = 6)
1861    SendUnicodeChar(0x2208) ; element of
1862return
1863
1864neo_s:
1865  EbeneAktualisieren()
1866  if (Ebene12 and !(CheckDeadUni12("a1",0x015B,0x015A)
1867              or CheckDeadUni12("a3",0x015F,0x015E)
1868              or CheckDeadUni12("a4",0x1E61,0x1E60)
1869              or CheckDeadUni12("c1",0x015D,0x015C)
1870              or CheckDeadUni12("c2",0x0161,0x0160)
1871              or CheckDeadUni12("c6",0x1E63,0x1A62)))
1872   {
1873      if (Ebene = 1)
1874      {
1875        if LangSTastatur
1876          if (GetKeyState("CapsLock","T"))
1877            send {blind}s
1878          else
1879            SendUnicodeChar(0x017F) ;langes S
1880        else
1881          send {blind}s
1882        if (PriorDeadKey = "comp")
1883          CompKey := "s"
1884      }
1885      else if (Ebene = 2)
1886      {
1887        if LangSTastatur
1888          if (GetKeyState("CapsLock","T"))
1889            SendUnicodeChar(0x017F) ;langes S
1890          else
1891            send {blind}S
1892        else
1893          send {blind}S
1894        if (PriorDeadKey = "comp")
1895          CompKey := "S"
1896      }
1897  }
1898  else if (Ebene = 3)
1899    send {blind}?
1900  else if (Ebene = 4)
1901    Send �
1902  else if (Ebene = 5)
1903    SendUnicodeChar(0x03C3) ;sigma
1904  else if (Ebene = 6)
1905    SendUnicodeChar(0x03A3)  ; Sigma
1906return
1907
1908neo_n:
1909  EbeneAktualisieren()
1910  if (Ebene12 and !(CheckDeadUni12("a1",0x0144,0x0143)
1911            or CheckDeadUni12("a3",0x0146,0x0145)
1912            or CheckDeadUni12("a4",0x1E45,0x1E44)
1913            or CheckDeadUni12("c2",0x0148,0x0147)
1914            or CheckDeadUni12("t1",0x00F1,0x00D1)))
1915    OutputChar("n","N")
1916  else if (Ebene = 3)
1917    send {blind}(            ; )
1918  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2074)
1919                  or CheckDeadUni("c5",0x2084)))
1920    Send {blind}{NumPad4}
1921  else if (Ebene = 5)
1922    SendUnicodeChar(0x03BD) ; nu
1923  else if (Ebene = 6)
1924    SendUnicodeChar(0x2115) ; N (nat�rliche Zahlen)
1925return
1926
1927neo_r:
1928  EbeneAktualisieren()
1929  if (Ebene12 and !(CheckDeadUni12("a1",0x0155,0x0154)
1930            or CheckDeadUni12("a3",0x0157,0x0156)
1931            or CheckDeadUni12("a4",0x0E59,0x0E58)
1932            or CheckDeadUni12("c2",0x0159,0x0158)
1933            or CheckDeadUni12("c6",0x1E5B,0x1E5A)
1934            or CheckCompAsc12("o","�","�")
1935            or CheckCompAsc12("O","�","�")))
1936    OutputChar("r","R")
1937  else if (Ebene = 3)           ;(
1938    send {blind})
1939  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2075)
1940                  or CheckDeadUni("c5",0x2085)))
1941    Send {blind}{NumPad5}
1942  else if (Ebene = 5)
1943    SendUnicodeChar(0x03F1) ; rho symbol (varrho)
1944  else if (Ebene = 6)
1945    SendUnicodeChar(0x211D) ; R (reelle Zahlen)
1946return
1947
1948neo_t:
1949  EbeneAktualisieren()
1950  if (Ebene12 and !(CheckDeadUni12("a3",0x0163,0x0162)
1951            or CheckDeadUni12("a4",0x1E6B,0x1E6A)
1952            or CheckDeadUni12("c2",0x0165,0x0164)
1953            or CheckDeadUni12("c5",0x0167,0x0166)
1954            or CheckDeadUni12("c6",0x1E6D,0x1E6C)))
1955    OutputChar("t","T")
1956  else if (Ebene = 3)
1957    send {blind}- ; Bis
1958  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2076)
1959                  or CheckDeadUni("c5",0x2086)))
1960    Send {blind}{NumPad6}
1961  else if (Ebene = 5)
1962    SendUnicodeChar(0x03C4) ; tau
1963  else if (Ebene = 6)
1964    SendUnicodeChar(0x2202 ) ; partielle Ableitung
1965return
1966
1967neo_d:
1968   EbeneAktualisieren()
1969   if (Ebene12 and !(CheckDeadUni12("a4",0x1E0B,0x1E0A)
1970                  or CheckDeadUni12("c2",0x010F,0x010E)
1971                  or CheckDeadUni12("c5",0x0111,0x0110)
1972                  or CheckDeadUni12("c6",0x1E0D,0x1E0C)
1973                  or CheckDeadUni12("t4",0x00F0,0x00D0)))
1974      OutputChar("d","D")
1975   else if (Ebene = 3)
1976      send {blind}:
1977   else if (Ebene = 4)
1978                send `,
1979   else if (Ebene = 5)
1980      SendUnicodeChar(0x03B4) ;delta
1981   else if (Ebene = 6)
1982      SendUnicodeChar(0x0394)  ; Delta
1983return
1984
1985neo_y:
1986  EbeneAktualisieren()
1987  if (Ebene12 and !(CheckDeadUni12("a1",0x00FD,0x00DD)
1988            or CheckDeadUni12("c1",0x0177,0x0176)
1989            or CheckDeadAsc12("t3","�",�)))
1990    OutputChar("y","Y")
1991  else if (Ebene = 3)
1992    send {blind}@
1993  else if (Ebene = 4)
1994    Send {blind}.
1995  else if (Ebene = 5)
1996    SendUnicodeChar(0x03C5) ; upsilon
1997  else if (Ebene = 6)
1998    SendUnicodeChar(0x2207) ; nabla
1999return
2000
2001/*
2002
2003  Reihe 4
2004
2005*/
2006
2007neo_�:
2008  EbeneAktualisieren()
2009  if (Ebene12 and !(CheckDeadUni12("a1",0x01D8,0x01D7)
2010            or CheckDeadUni12("a2",0x01DC,0x01DB)
2011            or CheckDeadUni12("c2",0x01DA,0x01D9)
2012            or CheckDeadUni12("t2",0x01D6,0x01D5)))
2013    OutputChar("�","�")
2014  else if (Ebene = 3)
2015    send {#}
2016  else if (Ebene = 4)
2017    Send {blind}{Esc}
2018  else if (Ebene = 5)
2019  {
2020    DeadKey := PriorDeadKey
2021    CompKey := PriorCompKey
2022  } ; leer
2023  else if (Ebene = 6)
2024    SendUnicodeChar(0x221D) ; proportional
2025return
2026
2027neo_�:
2028  EbeneAktualisieren()
2029  if (Ebene12 and !(CheckDeadUni12("t2",0x022B,0x022A)))
2030    OutputChar("�","�")
2031  else if (Ebene = 3)
2032    send {blind}$
2033  else if (Ebene = 4)
2034    send {blind}{Tab}
2035  else if (Ebene = 5)
2036  {
2037    DeadKey := PriorDeadKey
2038    CompKey := PriorCompKey
2039  } ; leer
2040  else if (Ebene = 6)
2041    SendUnicodeChar(0x2111) ; Fraktur I
2042return
2043
2044neo_�:
2045  EbeneAktualisieren()
2046  if (Ebene12 and !(CheckDeadUni12("t2",0x01DF,0x01DE)))
2047    OutputChar("�","�")
2048  else if (Ebene = 3)
2049    send {blind}|
2050  else if (Ebene = 4)
2051    Send {blind}{PgDn}   ; Next
2052  else if (Ebene = 5)
2053    SendUnicodeChar(0x03B7) ; eta
2054  else if (Ebene = 6)
2055    SendUnicodeChar(0x211C) ; altes R
2056return
2057
2058neo_p:
2059  EbeneAktualisieren()
2060  if (Ebene12 and !(CheckDeadUni12("a4",0x1E57,0x1E56)))
2061    OutputChar("p","P")
2062  else if ((Ebene = 3) and !(CheckDeadUni("t1",0x2248)))
2063    send {blind}~
2064  else if (Ebene = 4)
2065      Send {blind}{Enter}
2066  else if (Ebene = 5)
2067    SendUnicodeChar(0x03C0) ;pi
2068  else if (Ebene = 6)
2069    SendUnicodeChar(0x03A0)  ; Pi
2070return
2071
2072neo_z:
2073  EbeneAktualisieren()
2074  if (Ebene12 and !(CheckDeadUni12("a1",0x017A,0x0179)
2075            or CheckDeadUni12("a4",0x017C,0x017B)
2076            or CheckDeadUni12("c2",0x017E,0x017D)
2077            or CheckDeadUni12("c6",0x1E93,0x1E92)))
2078    OutputChar("z","Z")
2079  else if (Ebene = 3)
2080    send ``{space} ; untot
2081  else if (Ebene = 4)
2082  {
2083    DeadKey := PriorDeadKey
2084    CompKey := PriorCompKey
2085  } ; leer
2086  else if (Ebene = 5)
2087    SendUnicodeChar(0x03B6) ;zeta
2088  else if (Ebene = 6)
2089    SendUnicodeChar(0x2124)  ; Z (ganze Zahlen)
2090return
2091
2092neo_b:
2093  EbeneAktualisieren()
2094  if (Ebene12 and !(CheckDeadUni12("a4",0x1E03,0x1E02)))
2095    OutputChar("b","B")
2096  else if (Ebene = 3)
2097    send {blind}{+}
2098  else if (Ebene = 4)
2099    send {blind}:
2100  else if (Ebene = 5)
2101    SendUnicodeChar(0x03B2) ; beta
2102  else if (Ebene = 6)
2103    SendUnicodeChar(0x21D2) ; Doppel-Pfeil rechts
2104return
2105
2106neo_m:
2107  EbeneAktualisieren()
2108  if (Ebene12 and !(CheckDeadUni12("a4",0x1E41,0x1E40)
2109            or CheckDeadUni12("c6",0x1E43,0x1E42)
2110            or CheckCompUni12("t",0x2122,0x2122)      ; TM
2111            or CheckCompUni12("T",0x2122,0x2122)      ; TM
2112            or CheckCompUni12("s",0x2120,0x2120)      ; SM
2113            or CheckCompUni12("S",0x2120,0x2120)))    ; SM
2114
2115    OutputChar("m","M")
2116  else if (Ebene = 3)
2117    send {blind}`%
2118  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x00B9)
2119                  or CheckDeadUni("c5",0x2081)))
2120    Send {blind}{NumPad1}
2121  else if (Ebene = 5)
2122    SendUnicodeChar(0x03BC) ; griechisch mu, micro w�re 0x00B5
2123  else if (Ebene = 6)
2124    SendUnicodeChar(0x21D4) ; doppelter Doppelpfeil (genau dann wenn)
2125return
2126
2127neo_komma:
2128  EbeneAktualisieren()
2129  if (Ebene = 1)
2130    if (GetKeyState("CapsLock","T"))
2131      send {blind}{Shift down},{Shift up}
2132    else
2133      send {blind},
2134  else if (Ebene = 2)
2135     SendUnicodeChar(0x22EE) ;  vertikale ellipse
2136  else if (Ebene = 3)
2137    send {blind}"
2138  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x00B2)
2139                  or CheckDeadUni("c5",0x2082)))
2140    Send {blind}{NumPad2}
2141  else if (Ebene = 5)
2142    SendUnicodeChar(0x03C1) ; rho
2143  else if (Ebene = 6)
2144    SendUnicodeChar(0x21D0) ; Doppelpfeil links
2145return
2146
2147neo_punkt:
2148  EbeneAktualisieren()
2149  if (Ebene = 1)
2150    if (GetKeyState("CapsLock","T"))
2151      send {blind}{Shift down}.{Shift up}
2152    else
2153      send {blind}.
2154  else if (Ebene = 2)
2155    SendUnicodeChar(0x2026)  ; ellipse
2156  else if (Ebene = 3)
2157    send {blind}'
2158  else if ((Ebene = 4) and !(CheckDeadUni("c1",0x00B3)
2159                  or CheckDeadUni("c5",0x2083)))
2160    Send {blind}{NumPad3}
2161  else if (Ebene = 5)
2162    SendUnicodeChar(0x03D1) ; theta symbol (vartheta)
2163  else if (Ebene = 6)
2164    SendUnicodeChar(0x0398)  ; Theta
2165return
2166
2167
2168neo_j:
2169  EbeneAktualisieren()
2170  if (Ebene12 and !(CheckDeadUni12("c1",0x0135,0x0134)
2171            or CheckDeadUni12("c2",0x01F0,"")
2172            or CheckCompUni12("i",0x0133,"")       ; ij
2173            or CheckCompUni12("I","",0x0132)       ; IJ
2174            or CheckCompUni12("l",0x01C9,"")       ; lj
2175            or CheckCompUni12("L",0x01C8,0x01C7)    ; Lj/LJ
2176            or CheckCompUni12("n",0x01CC,"")       ; nj
2177            or CheckCompUni12("N",0x01CB,0x01CA)))   ; Nj/NJ
2178    OutputChar("j","J")
2179  else if (Ebene = 3)
2180    send {blind}`;
2181  else if (Ebene = 4)
2182    Send {blind}`;
2183  else if (Ebene = 5)
2184    SendUnicodeChar(0x03B8) ; theta
2185  else if (Ebene = 6)
2186    SendUnicodeChar(0x2261) ; identisch
2187return
2188
2189/*
2190
2191  Numpad
2192
2193
2194  folgende Tasten verhalten sich bei ein- und ausgeschaltetem
2195  NumLock gleich:
2196*/
2197
2198neo_NumpadDiv:
2199  EbeneAktualisieren()
2200  if ((Ebene = 1) or (Ebene = 2))
2201    send {blind}{NumpadDiv}
2202  else if (Ebene = 3)
2203    send {blind}�
2204  else if ((Ebene = 4) or (Ebene = 5))
2205    SendUnicodeChar(0x2215)  ; slash
2206return
2207
2208neo_NumpadMult:
2209  EbeneAktualisieren()
2210  if ((Ebene = 1) or (Ebene = 2))
2211    send {blind}{NumpadMult}
2212  else if (Ebene = 3)
2213    send {blind}�
2214  else if ((Ebene = 4) or (Ebene = 5))
2215    SendUnicodeChar(0x22C5)  ; cdot
2216return
2217
2218neo_NumpadSub:
2219  EbeneAktualisieren()
2220  if (((Ebene = 1) or (Ebene = 2)) and !(CheckDeadUni("c1",0x207B)
2221                          or CheckDeadUni("c5",0x208B)))
2222    send {blind}{NumpadSub}
2223  else if (Ebene = 3)
2224    SendUnicodeChar(0x2212) ; echtes minus
2225return
2226
2227neo_NumpadAdd:
2228  EbeneAktualisieren()
2229  if (((Ebene = 1) or (Ebene = 2)) and !(CheckDeadUni("c1",0x207A)
2230                          or CheckDeadUni("c5",0x208A)))
2231    send {blind}{NumpadAdd}
2232  else if (Ebene = 3)
2233    send {blind}�
2234  else if ((Ebene = 4) or (Ebene = 5))
2235    SendUnicodeChar(0x2213)  ; -+
2236return
2237
2238neo_NumpadEnter:
2239  EbeneAktualisieren()
2240  if ((Ebene = 1) or (Ebene = 2))
2241    send {blind}{NumpadEnter}
2242  else if (Ebene = 3)
2243    SendUnicodeChar(0x2260) ; neq
2244  else if ((Ebene = 4) or (Ebene = 5))
2245    SendUnicodeChar(0x2248) ; approx
2246return
2247
2248/*
2249  folgende Tasten verhalten sich bei ein- und ausgeschaltetem NumLock
2250  unterschiedlich
2251*/
2252
2253
2254
2255neo_Numpad7:
2256  EbeneAktualisieren()
2257  if    ((Ebene = 1) and (NumLock = 0))
2258    send {blind}{NumpadHome}
2259  else if ((Ebene = 2) and (NumLock = 1))
2260    send {blind}{Shift up}{NumpadHome}{Shift down}
2261  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2262  {
2263    if (Ebene = 1)
2264      send {blind}{Numpad7}
2265    else
2266      send {blind){Shift up}{Numpad7}{Shift down}
2267
2268    if (PriorDeadKey = "comp")
2269      CompKey := "Num_7"
2270  }
2271  else if (Ebene = 3)
2272    SendUnicodeChar(0x2195)  ; Hoch-Runter-Pfeil
2273  else if ((Ebene = 4) or (Ebene = 5))
2274    SendUnicodeChar(0x226A)  ; ll
2275return
2276
2277neo_Numpad8:
2278  EbeneAktualisieren()
2279  if    ((Ebene = 1) and (NumLock = 0))
2280    send {blind}{NumpadUp}
2281  else if ((Ebene = 2) and (NumLock = 1))
2282    send {blind}{Shift up}{NumpadUp}{Shift down}
2283  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2284  {
2285    if !(CheckCompUni("Num_1",0x215B) ; 1/8
2286      or CheckCompUni("1",0x215B)    ; 1/8
2287      or CheckCompUni("Num_3",0x215C) ; 3/8
2288      or CheckCompUni("3",0x215C)    ; 3/8
2289      or CheckCompUni("Num_5",0x215D) ; 3/8
2290      or CheckCompUni("5",0x215D)    ; 5/8
2291      or CheckCompUni("Num_7",0x215E) ; 7/8
2292      or CheckCompUni("7",0x215E))   ; 7/8
2293      if (Ebene = 1)
2294        send {blind}{Numpad8}
2295      else
2296        send {blind){Shift up}{Numpad8}{Shift down}
2297
2298    if (PriorDeadKey = "comp")
2299      CompKey := "Num_8"
2300  }
2301  else if (Ebene = 3)
2302    SendUnicodeChar(0x2191)    ; uparrow
2303  else if ((Ebene = 4) or (Ebene = 5))
2304    SendUnicodeChar(0x2229)   ; intersection
2305return
2306
2307neo_Numpad9:
2308  EbeneAktualisieren()
2309  if    ((Ebene = 1) and (NumLock = 0))
2310    send {blind}{NumpadPgUp}
2311  else if ((Ebene = 2) and (NumLock = 1))
2312    send {blind}{Shift up}{NumpadPgUp}{Shift down}
2313  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2314  {
2315    if (Ebene = 1)
2316      send {blind}{Numpad9}
2317    else
2318      send {blind){Shift up}{Numpad9}{Shift down}
2319
2320    if (PriorDeadKey = "comp")
2321      CompKey := "Num_9"
2322  }
2323  else if (Ebene = 3)
2324    SendUnicodeChar(0x2297) ; Tensorprodukt ; Vektor in die Ebene zeigend
2325  else if ((Ebene = 4) or (Ebene = 5))
2326    SendUnicodeChar(0x226B)  ; gg
2327return
2328
2329
2330
2331neo_Numpad4:
2332  EbeneAktualisieren()
2333  if    ((Ebene = 1) and (NumLock = 0))
2334    send {blind}{NumpadLeft}
2335  else if ((Ebene = 2) and (NumLock = 1))
2336    send {blind}{Shift up}{NumpadLeft}{Shift down}
2337  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2338  {
2339    if !(CheckCompUni("Num_1",0x00BC) ; 1/4
2340      or CheckCompUni("1",0x00BE)    ; 1/4
2341      or CheckCompUni("Num_3",0x00BE) ; 3/4
2342      or CheckCompUni("3",0x00BE))   ; 3/4
2343      if (Ebene = 1)
2344        send {blind}{Numpad4}
2345      else
2346        send {blind){Shift up}{Numpad4}{Shift down}
2347
2348    if (PriorDeadKey = "comp")
2349      CompKey := "Num_4"
2350  }
2351  else if (Ebene = 3)
2352    SendUnicodeChar(0x2190)    ; leftarrow
2353  else if ((Ebene = 4) or (Ebene = 5))
2354    SendUnicodeChar(0x2282)  ; subset of
2355return
2356
2357neo_Numpad5:
2358  EbeneAktualisieren()
2359  if    ((Ebene = 1) and (NumLock = 0))
2360    send {blind}{NumpadClear}
2361  else if ((Ebene = 2) and (NumLock = 1))
2362    send {blind}{Shift up}{NumpadClear}{Shift down}
2363  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2364  {
2365    if !(CheckCompUni("Num_1",0x2155) ; 1/5
2366      or CheckCompUni("1",0x2155)    ; 1/5
2367      or CheckCompUni("Num_2",0x2156) ; 2/5
2368      or CheckCompUni("2",0x2156)    ; 2/5
2369      or CheckCompUni("Num_3",0x2157) ; 3/5
2370      or CheckCompUni("3",0x2157)    ; 3/5
2371      or CheckCompUni("Num_4",0x2158) ; 4/5
2372      or CheckCompUni("4",0x2158))   ; 4/5
2373      if (Ebene = 1)
2374        send {blind}{Numpad5}
2375      else
2376        send {blind){Shift up}{Numpad5}{Shift down}
2377
2378    if (PriorDeadKey = "comp")
2379      CompKey := "Num_5"
2380  }
2381  else if (Ebene = 3)
2382    SendUnicodeChar(0x221E) ; INFINITY
2383  else if ((Ebene = 4) or (Ebene = 5))
2384    SendUnicodeChar(0x220B) ; enth�lt das Element
2385return
2386
2387neo_Numpad6:
2388  EbeneAktualisieren()
2389  if    ((Ebene = 1) and (NumLock = 0))
2390    send {blind}{NumpadRight}
2391  else if ((Ebene = 2) and (NumLock = 1))
2392    send {blind}{Shift up}{NumpadRight}{Shift down}
2393  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2394  {
2395    if !(CheckCompUni("Num_1",0x2159) ; 1/6
2396      or CheckCompUni("1",0x2159)    ; 1/6
2397      or CheckCompUni("Num_5",0x215A) ; 5/6
2398      or CheckCompUni("5",0x215A))   ; 5/6
2399      if (Ebene = 1)
2400        send {blind}{Numpad6}
2401      else
2402        send {blind){Shift up}{Numpad6}{Shift down}
2403
2404    if (PriorDeadKey = "comp")
2405      CompKey := "Num_6"
2406  }
2407  else if (Ebene = 3)
2408    SendUnicodeChar(0x2192)    ; rightarrow
2409  else if ((Ebene = 4) or (Ebene = 5))
2410    SendUnicodeChar(0x2283) ; superset of
2411return
2412
2413neo_Numpad1:
2414  EbeneAktualisieren()
2415  if    ((Ebene = 1) and (NumLock = 0))
2416    send {blind}{NumpadEnd}
2417  else if ((Ebene = 2) and (NumLock = 1))
2418    send {blind}{Shift up}{NumpadEnd}{Shift down}
2419  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2420  {
2421    if (Ebene = 1)
2422      send {blind}{Numpad1}
2423    else
2424      send {blind){Shift up}{Numpad1}{Shift down}
2425
2426    if (PriorDeadKey = "comp")
2427      CompKey := "Num_1"
2428  }
2429  else if (Ebene = 3)
2430    SendUnicodeChar(0x2194) ; Links-Rechts-Pfeil
2431  else if ((Ebene = 4) or (Ebene = 5))
2432    SendUnicodeChar(0x2264)  ; leq
2433return
2434
2435neo_Numpad2:
2436  EbeneAktualisieren()
2437  if    ((Ebene = 1) and (NumLock = 0))
2438    send {blind}{NumpadDown}
2439  else if ((Ebene = 2) and (NumLock = 1))
2440    send {blind}{Shift up}{NumpadDown}{Shift down}
2441  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2442  {
2443    if !(CheckCompUni("Num_1",0x00BD) ; 1/2
2444      or CheckCompUni("1",0x00BD))   ; 1/2
2445      if (Ebene = 1)
2446        send {blind}{Numpad2}
2447      else
2448        send {blind){Shift up}{Numpad2}{Shift down}
2449
2450    if (PriorDeadKey = "comp")
2451      CompKey := "Num_2"
2452  }
2453  else if (Ebene = 3)
2454    SendUnicodeChar(0x2193)    ; downarrow
2455  else if ((Ebene = 4) or (Ebene = 5))
2456    SendUnicodeChar(0x222A)  ; vereinigt
2457return
2458
2459neo_Numpad3:
2460  EbeneAktualisieren()
2461  if    ((Ebene = 1) and (NumLock = 0))
2462    send {blind}{NumpadPgDn}
2463  else if ((Ebene = 2) and (NumLock = 1))
2464    send {blind}{Shift up}{NumpadPgDn}{Shift down}
2465  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2466  {
2467    if !(CheckCompUni("Num_1",0x2153) ; 1/3
2468      or CheckCompUni("1",0x2154)    ; 1/3
2469      or CheckCompUni("Num_2",0x2154) ; 2/3
2470      or CheckCompUni("2",0x2154))   ; 2/3
2471      if (Ebene = 1)
2472        send {blind}{Numpad3}
2473      else
2474        send {blind){Shift up}{Numpad3}{Shift down}
2475
2476    if (PriorDeadKey = "comp")
2477      CompKey := "Num_3"
2478  }
2479  else if (Ebene = 3)
2480    SendUnicodeChar(0x21CC) ; RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
2481  else if ((Ebene = 4) or (Ebene = 5))
2482    SendUnicodeChar(0x2265)  ; geq
2483return
2484
2485neo_Numpad0:
2486  EbeneAktualisieren()
2487  if    ((Ebene = 1) and (NumLock = 0))
2488    send {blind}{NumpadIns}
2489  else if ((Ebene = 2) and (NumLock = 1))
2490    send {blind}{Shift up}{NumpadIns}{Shift down}
2491  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2492  {
2493    if (Ebene = 1)
2494      send {blind}{Numpad0}
2495    else
2496      send {blind){Shift up}{Numpad0}{Shift down}
2497
2498    if (PriorDeadKey = "comp")
2499      CompKey := "Num_0"
2500  }
2501  else if (Ebene = 3)
2502    send {blind}`%
2503  else if ((Ebene = 4) or (Ebene = 5))
2504    send �
2505return
2506
2507neo_NumpadDot:
2508  EbeneAktualisieren()
2509  if    ((Ebene = 1) and (NumLock = 0))
2510    send {blind}{NumpadDel}
2511  else if ((Ebene = 2) and (NumLock = 1))
2512    send {blind}{Shift up}{NumpadDel}{Shift down}
2513  else if (((Ebene = 1) and (NumLock = 1)) or ((Ebene = 2) and (NumLock = 0)))
2514    if (Ebene = 1)
2515      send {blind}{NumpadDot}
2516    else
2517      send {blind){Shift up}{NumpadDot}{Shift down}
2518  else if (Ebene = 3)
2519    send {blind}.
2520  else if ((Ebene = 4) or (Ebene = 5))
2521    send `,
2522return
2523
2524
2525/*
2526
2527  Sondertasten
2528
2529*/
2530*space::
2531  if ((einHandNeo))
2532   spacepressed := 1
2533  else
2534   goto neo_SpaceUp
2535return
2536
2537*space up::
2538  if ((einHandNeo))
2539  {
2540    if ((keypressed))
2541    {
2542     keypressed := 0
2543     spacepressed := 0
2544    }
2545    else
2546    {
2547      goto neo_SpaceUp
2548    }
2549  }
2550  else
2551    { } ;do nothing
2552return
2553
2554neo_SpaceUp:
2555    EbeneAktualisieren()
2556    if ((Ebene = 1) and !(CheckComp3Uni("r_1",0x2170)       ; r�misch i
2557                    or CheckComp3Uni("R_1",0x2160)))    ; r�misch I
2558      Send {blind}{Space}
2559    else if  ((Ebene = 2) or (Ebene = 3))
2560      Send {blind}{Space}
2561    else if (Ebene = 4 and !(CheckDeadUni("c1",0x2070)
2562                       or CheckDeadUni("c5",0x2080)))
2563      Send {blind}{NumPad0}
2564    else if (Ebene = 5)
2565      SendUnicodeChar(0x00A0)  ; gesch�tztes Leerzeichen
2566    else if (Ebene = 6)
2567      SendUnicodeChar(0x202F) ; schmales Leerzeichen
2568    DeadKey := ""  CompKey := ""
2569  spacepressed := 0
2570  keypressed := 0
2571return
2572
2573/*
2574  Folgende Tasten sind nur aufgef�hrt, um PriorDeadKey zu leeren.
2575  Irgendwie sieht das noch nicht sch�n aus. Vielleicht l�sst sich dieses
2576  Problem irgendwie eleganter l�sen...
2577
2578  Nachtrag:
2579  Weil es mit Alt+Tab Probleme gab, wird hier jetzt erstmal rumgeflickschustert,
2580  bis eine allgemeinere L�sung gefunden wurde.
2581*/
2582
2583*Enter::
2584  if (not(lernModus) or lernModus_std_Return)
2585  {
2586    send {Blind}{Enter}
2587    DeadKey := ""  CompKey := ""
2588  }
2589return
2590
2591*Backspace::
2592  if (not(lernModus) or lernModus_std_Backspace)
2593  {
2594    send {Blind}{Backspace}
2595    DeadKey := ""  CompKey := ""
2596  }
2597return
2598
2599*Del::
2600  if (not(lernModus) or lernModus_std_Entf)
2601    send {Blind}{Del}
2602return
2603
2604*Ins::
2605  if (not(lernModus) or lernModus_std_Einf)
2606    send {Blind}{Ins}
2607return
2608
2609
2610/*
2611Auf Mod3+Tab liegt Compose.
2612*/
2613
2614neo_tab:
2615  if (IsMod3Pressed()) ;#
2616  {
2617    DeadKey := "comp"
2618    CompKey := ""
2619  }
2620  else
2621  {
2622    send {blind}{Tab}
2623    DeadKey := ""
2624    CompKey := ""
2625  }
2626return
2627
2628*Home::
2629  if (not(lernModus) or lernModus_std_Pos1)
2630  {
2631    send {Blind}{Home}
2632    DeadKey := ""  CompKey := ""
2633  }
2634return
2635
2636*End::
2637  if (not(lernModus) or lernModus_std_Ende)
2638  {
2639    send {Blind}{End}
2640    DeadKey := ""  CompKey := ""
2641  }
2642return
2643
2644*PgUp::
2645  if (not(lernModus) or lernModus_std_PgUp)
2646  {
2647    send {Blind}{PgUp}
2648    DeadKey := ""  CompKey := ""
2649  }
2650return
2651
2652*PgDn::
2653  if (not(lernModus) or lernModus_std_PgDn)
2654  {
2655    send {Blind}{PgDn}
2656    DeadKey := ""  CompKey := ""
2657  }
2658return
2659
2660*Up::
2661  if (not(lernModus) or lernModus_std_Hoch)
2662  {
2663    send {Blind}{Up}
2664    DeadKey := ""  CompKey := ""
2665  }
2666return
2667
2668*Down::
2669  if (not(lernModus) or lernModus_std_Runter)
2670  {
2671    send {Blind}{Down}
2672    DeadKey := ""  CompKey := ""
2673  }
2674return
2675
2676*Left::
2677  if (not(lernModus) or lernModus_std_Links)
2678  {
2679    send {Blind}{Left}
2680    DeadKey := ""  CompKey := ""
2681  }
2682return
2683
2684*Right::
2685  if (not(lernModus) or lernModus_std_Rechts)
2686  {
2687    send {Blind}{Right}
2688    DeadKey := ""  CompKey := ""
2689  }
2690return
2691
2692
2693
2694
2695
2696/*
2697   ------------------------------------------------------
2698   Methode KeyboardLED zur Steuerung der Keyboard-LEDs
2699   (NumLock/CapsLock/ScrollLock-Lichter)
2700   
2701   Benutzungshinweise: Man benutze
2702   KeyboardLED(LEDvalue,"Cmd"), wobei
2703   Cmd = on/off/switch,
2704   LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4
2705   bzw. eine beliebige Summe dieser Werte:
2706   AlleAus=0, CapsLock+NumLock=6, etc.
2707   
2708   Der folgende Code wurde �bernommen von:
2709   http://www.autohotkey.com/forum/viewtopic.php?t=10532
2710   
2711   Um eventuelle Wechselwirkungen mit dem bestehenden
2712   Code (insb. der Unicode-Konvertierung) auszuschie�en,
2713   sind auch alle (Hilfsmethoden) mit dem Postfix LED
2714   versehen worden.
2715   ------------------------------------------------------
2716*/
2717
2718KeyboardLED(LEDvalue, Cmd)  ; LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4 ; Cmd = on/off/switch
2719{
2720  Static h_device
2721  If ! h_device ; initialise
2722    {
2723    device =\Device\KeyBoardClass0
2724    SetUnicodeStrLED(fn,device)
2725    h_device:=NtCreateFileLED(fn,0+0x00000100+0x00000080+0x00100000,1,1,0x00000040+0x00000020,0)
2726    }
2727
2728  VarSetCapacity( output_actual, 4, 0 )
2729  input_size = 4
2730  VarSetCapacity( input, input_size, 0 )
2731
2732  If Cmd= switch  ;switches every LED according to LEDvalue
2733   KeyLED:= LEDvalue
2734  If Cmd= on  ;forces all choosen LED's to ON (LEDvalue= 0 ->LED's according to keystate)
2735   KeyLED:= LEDvalue | (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
2736  If Cmd= off  ;forces all choosen LED's to OFF (LEDvalue= 0 ->LED's according to keystate)
2737    {
2738    LEDvalue:= LEDvalue ^ 7
2739    KeyLED:= LEDvalue & (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
2740    }
2741  ; EncodeIntegerLED( KeyLED, 1, &input, 2 ) ;input bit pattern (KeyLED): bit 0 = scrolllock ;bit 1 = numlock ;bit 2 = capslock
2742  input := Chr(1) Chr(1) Chr(KeyLED)
2743  input := Chr(1)
2744  input=
2745  success := DllCall( "DeviceIoControl"
2746              , "uint", h_device
2747              , "uint", CTL_CODE_LED( 0x0000000b     ; FILE_DEVICE_KEYBOARD
2748                        , 2
2749                        , 0             ; METHOD_BUFFERED
2750                        , 0  )          ; FILE_ANY_ACCESS
2751              , "uint", &input
2752              , "uint", input_size
2753              , "uint", 0
2754              , "uint", 0
2755              , "uint", &output_actual
2756              , "uint", 0 )
2757}
2758
2759CTL_CODE_LED( p_device_type, p_function, p_method, p_access )
2760{
2761  Return, ( p_device_type << 16 ) | ( p_access << 14 ) | ( p_function << 2 ) | p_method
2762}
2763
2764
2765NtCreateFileLED(ByRef wfilename,desiredaccess,sharemode,createdist,flags,fattribs)
2766{
2767  VarSetCapacity(fh,4,0)
2768  VarSetCapacity(objattrib,24,0)
2769  VarSetCapacity(io,8,0)
2770  VarSetCapacity(pus,8)
2771  uslen:=DllCall("lstrlenW","str",wfilename)*2
2772  InsertIntegerLED(uslen,pus,0,2)
2773  InsertIntegerLED(uslen,pus,2,2)
2774  InsertIntegerLED(&wfilename,pus,4)
2775  InsertIntegerLED(24,objattrib,0)
2776  InsertIntegerLED(&pus,objattrib,8)
2777  status:=DllCall("ntdll\ZwCreateFile","str",fh,"UInt",desiredaccess,"str",objattrib,"str",io,"UInt",0,"UInt",fattribs
2778                  ,"UInt",sharemode,"UInt",createdist,"UInt",flags,"UInt",0,"UInt",0, "UInt")
2779  return ExtractIntegerLED(fh)
2780}
2781
2782
2783SetUnicodeStrLED(ByRef out, str_)
2784{
2785  VarSetCapacity(st1, 8, 0)
2786  InsertIntegerLED(0x530025, st1)
2787  VarSetCapacity(out, (StrLen(str_)+1)*2, 0)
2788  DllCall("wsprintfW", "str", out, "str", st1, "str", str_, "Cdecl UInt")
2789}
2790
2791
2792ExtractIntegerLED(ByRef pSource, pOffset = 0, pIsSigned = false, pSize = 4)
2793; pSource is a string (buffer) whose memory area contains a raw/binary integer at pOffset.
2794; The caller should pass true for pSigned to interpret the result as signed vs. unsigned.
2795; pSize is the size of PSource's integer in bytes (e.g. 4 bytes for a DWORD or Int).
2796; pSource must be ByRef to avoid corruption during the formal-to-actual copying process
2797; (since pSource might contain valid data beyond its first binary zero).
2798{
2799  Loop %pSize%  ; Build the integer by adding up its bytes.
2800    result += *(&pSource + pOffset + A_Index-1) << 8*(A_Index-1)
2801  if (!pIsSigned OR pSize > 4 OR result < 0x80000000)
2802    return result  ; Signed vs. unsigned doesn't matter in these cases.
2803  ; Otherwise, convert the value (now known to be 32-bit) to its signed counterpart:
2804  return -(0xFFFFFFFF - result + 1)
2805}
2806
2807
2808InsertIntegerLED(pInteger, ByRef pDest, pOffset = 0, pSize = 4)
2809; The caller must ensure that pDest has sufficient capacity.  To preserve any existing contents in pDest,
2810; only pSize number of bytes starting at pOffset are altered in it.
2811{
2812  Loop %pSize%  ; Copy each byte in the integer into the structure as raw binary data.
2813    DllCall("RtlFillMemory", "UInt", &pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
2814}
2815
2816
2817
2818
2819/*
2820  Funktionen
2821*/
2822
2823/*
2824Ebenen laut Referenz:
28251. Ebene (kein Mod)      4. Ebene (Mod4)
28262. Ebene (Umschalt)      5. Ebene (Umschalt+Mod3)
28273. Ebene (Mod3)          6. Ebene (Mod3+Mod4)
2828*/
2829
2830EbeneAktualisieren()
2831{
2832   global
2833   PriorDeadKey := DeadKey
2834   PriorCompKey := CompKey
2835   DeadKey := ""
2836   CompKey := ""
2837   Ebene12 := 0
2838   Ebene7 := 0
2839   Ebene8 := 0
2840   Modstate := IsShiftPressed() . IsMod3Pressed() . IsMod4Pressed()
2841
2842   if (ahkTreiberKombi)
2843      if ( Modstate = "001")
2844         Ebene = 6     
2845      else
2846         Ebene = -1
2847   else
2848     if      (Modstate = "000")
2849         Ebene = 1                 ; Ebene 1: Ohne Mod
2850     else if (Modstate = "100")
2851         Ebene = 2                 ; Ebene 2: Shift
2852     else if (Modstate = "010")
2853         Ebene = 3                 ; Ebene 3: Mod3
2854     else if (Modstate = "001")
2855         Ebene = 4                 ; Ebene 4: Mod4
2856     else if (Modstate = "110")
2857         Ebene = 5                 ; Ebene 5: Shift+Mod3
2858     else if (Modstate = "011")
2859         Ebene = 6                 ; Ebene 6: Mod3+Mod4
2860     else if (Modstate = "101")
2861     {
2862         Ebene = 4                 ; Ebene 7: Shift+Mod4 impliziert Ebene 4
2863         Ebene7 = 1
2864     }
2865     else if (Modstate = "111")
2866     {
2867         Ebene = 6                 ; Ebene 8: Shift+Mod3+Mod4 impliziert Ebene 6
2868         Ebene8 = 1
2869     }
2870
2871   Ebene12 := ((Ebene = 1) or (Ebene = 2))
2872
2873   if GetKeyState("NumLock","T")
2874     NumLock = 1
2875   else
2876     NumLock = 0
2877}
2878
2879
2880IsShiftPressed()
2881{
2882  return GetKeyState("Shift","P")
2883}
2884
2885IsMod3Pressed()
2886{
2887   global
2888   if (IsMod3Locked)
2889   {
2890       return (not ( GetKeyState("CapsLock","P") or GetKeyState("#","P") ))  ; # = SC02B
2891   }
2892   else {
2893      return ( GetKeyState("CapsLock","P") or GetKeyState("#","P") )  ; # = SC02B
2894   }
2895}
2896
2897IsMod4Pressed()
2898{
2899   global
2900   if( not(einHandNeo) or not(spacepressed) )
2901   {
2902     if (IsMod4Locked)
2903     {
2904         return (not ( GetKeyState("<","P") or GetKeyState("SC138","P")))
2905     }
2906     else {
2907         return ( GetKeyState("<","P") or GetKeyState("SC138","P"))
2908     }
2909   }
2910   else
2911   {
2912     if (IsMod4Locked)
2913     {
2914         return (not ( GetKeyState("<","P") or GetKeyState("SC138","P") or GetKeyState("�","P")))
2915     }
2916     else {
2917         return ( GetKeyState("<","P") or GetKeyState("SC138","P") or GetKeyState("�","P"))
2918     }
2919   }
2920   
2921}
2922
2923
2924SendUnicodeChar(charCode)
2925{
2926   IfWinActive, ahk_class gdkWindowToplevel
2927   {
2928      StringLower, charCode, charCode
2929      send % "^+u" . SubStr(charCode,3) . " "
2930   } else {
2931      VarSetCapacity(ki, 28 * 2, 0)
2932
2933      EncodeInteger(&ki + 0, 1)
2934      EncodeInteger(&ki + 6, charCode)
2935      EncodeInteger(&ki + 8, 4)
2936      EncodeInteger(&ki +28, 1)
2937      EncodeInteger(&ki +34, charCode)
2938      EncodeInteger(&ki +36, 4|2)
2939
2940      DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
2941   }
2942}
2943/*
2944�ber den GTK-Workaround:
2945Dieser basiert auf http://www.autohotkey.com/forum/topic32947.html
2946
2947Der Aufruf von �SubStr(charCode,3)� geht davon aus, dass alle charCodes in Hex mit f�hrendem �0x� angegeben sind. Die abenteuerliche �^+u�-Konstruktion ben�tigt im �brigen den Hex-Wert in Kleinschrift, was derzeit nicht bei den Zeichendefinitionen umgesetzt ist, daher zentral und weniger fehlertr�chtig an dieser Stelle. Au�erdem ein abschlie�end gesendetes Space, sonst bleibt der �eingetippte� Unicode-Wert noch kurz sichtbar stehen, bevor er sich GTK-sei-dank in das gew�nschte Zeichen verwandelt.
2948*/
2949
2950
2951BSSendUnicodeChar(charCode)
2952{
2953   send {bs}
2954   SendUnicodeChar(charCode)
2955}
2956
2957CompUnicodeChar(charCode)
2958{
2959   send {bs}
2960   SendUnicodeChar(charCode)
2961}
2962
2963Comp3UnicodeChar(charCode)
2964{
2965   send {bs}{bs}
2966   SendUnicodeChar(charCode)
2967}
2968
2969
2970EncodeInteger(ref, val)
2971{
2972   DllCall("ntdll\RtlFillMemoryUlong", "Uint", ref, "Uint", 4, "Uint", val)
2973}
2974
2975deadAsc(val)
2976{
2977  global
2978  if (DeadSilence)
2979    {} ; keine Ausgabe
2980  else
2981    send % "{blind}" . val
2982}
2983
2984deadUni(val)
2985{
2986  global
2987  if (DeadSilence)
2988    {} ; keine Ausgabe
2989  else
2990    SendUnicodeChar(val)
2991}
2992
2993undeadAsc(val)
2994{
2995  global
2996  if (DeadSilence)
2997    send % "{blind}" . val
2998  else
2999    send % "{blind}{bs}" . val
3000}
3001
3002undeadUni(val)
3003{
3004  global
3005  if (DeadSilence)
3006    {} ; keine ausgabe
3007  else
3008    send {bs}
3009  SendUnicodeChar(val)   
3010}
3011
3012CheckDeadAsc(d,val)
3013{
3014  global
3015  if (PriorDeadKey == d)
3016  {
3017    undeadAsc(val)
3018    return 1
3019  }
3020  else
3021    return 0
3022}
3023
3024CheckDeadUni(d,val)
3025{
3026  global
3027  if (PriorDeadKey == d)
3028  {
3029    undeadUni(val)
3030    return 1
3031  }
3032  else
3033    return 0
3034}
3035
3036CheckDeadAsc12(d,val1,val2)
3037{
3038  global
3039  if (PriorDeadKey == d)
3040  {
3041    if      ((Ebene = 1) and (val1 != ""))
3042    {
3043      undeadAsc(val1)
3044      return 1
3045    }
3046    else if ((Ebene = 2) and (val2 != ""))
3047    {
3048      undeadAsc(val2)
3049      return 1
3050    }
3051    else
3052      return 0
3053  }
3054  else
3055    return 0
3056}
3057
3058CheckDeadUni12(d,val1,val2)
3059{
3060  global
3061  if (PriorDeadKey == d)
3062  {
3063    if      ((Ebene = 1) and (val1 != ""))
3064    {
3065      undeadUni(val1)
3066      return 1
3067    }
3068    else if ((Ebene = 2) and (val2 != ""))
3069    {
3070      undeadUni(val2)
3071      return 1
3072    }
3073    else
3074      return 0
3075  }
3076  else
3077    return 0
3078}
3079
3080compAsc(val)
3081{
3082  global
3083  if (DeadCompose)
3084    {} ; keine Ausgabe
3085  else
3086    send % "{blind}" . val
3087}
3088
3089compUni(val)
3090{
3091  global
3092  if (DeadCompose)
3093    {} ; keine Ausgabe
3094  else
3095    SendUnicodeChar(val)
3096}
3097
3098uncompAsc(val)
3099{
3100  global
3101  if (DeadCompose)
3102    send % "{blind}" . val
3103  else
3104    send % "{blind}{bs}" . val
3105}
3106
3107uncompUni(val)
3108{
3109  global
3110  if (DeadCompose)
3111    {} ; keine ausgabe
3112  else
3113    send {bs}
3114  SendUnicodeChar(val)   
3115}
3116
3117uncomp3Uni(val)
3118{
3119  global
3120  if (DeadCompose)
3121    {} ; keine ausgabe
3122  else
3123    send {bs}{bs}
3124  SendUnicodeChar(val)   
3125}
3126
3127CheckCompAsc(d,val)
3128{
3129  global
3130  if (PriorCompKey == d)
3131  {
3132    uncompAsc(val)
3133    return 1
3134  }
3135  else
3136    return 0
3137}
3138
3139CheckCompAsc12(d,val1,val2)
3140{
3141  global
3142  if (PriorCompKey == d)
3143    if      ((Ebene = 1) and (val1 != ""))
3144    {
3145      uncompAsc(val1)
3146      return 1
3147    }
3148    else if ((Ebene = 2) and (val2 != ""))
3149    {
3150      uncompAsc(val2)
3151      return 1
3152    }
3153    else
3154      return 0
3155  else
3156    return 0
3157}
3158
3159CheckCompUni(d,val)
3160{
3161  global
3162  if (PriorCompKey == d)
3163  {
3164    uncompUni(val)
3165    return 1
3166  }
3167  else
3168    return 0
3169}
3170
3171CheckCompUni12(d,val1,val2)
3172{
3173  global
3174  if (PriorCompKey == d)
3175  {
3176    if      ((Ebene = 1) and (val1 != ""))
3177    {
3178      uncompUni(val1)
3179      return 1
3180    }
3181    else if ((Ebene = 2) and (val2 != ""))
3182    {
3183      uncompUni(val2)
3184      return 1
3185    }
3186    else
3187      return 0
3188  }
3189  else
3190    return 0
3191}
3192
3193CheckComp3Uni(d,val)
3194{
3195  global
3196  if (PriorCompKey == d)
3197  {
3198    uncomp3Uni(val)
3199    return 1
3200  }
3201  else
3202    return 0
3203}
3204
3205CheckComp3Uni12(d,val1,val2)
3206{
3207  global
3208  if (PriorCompKey == d)
3209  {
3210    if      ((Ebene = 1) and (val1 != ""))
3211    {
3212      uncomp3Uni(val1)
3213      return 1
3214    }
3215    else if ((Ebene = 2) and (val2 != ""))
3216    {
3217      uncomp3Uni(val2)
3218      return 1
3219    }
3220    else
3221      return 0
3222  }
3223  else
3224    return 0
3225}
3226
3227outputChar(val1,val2)
3228{
3229  global
3230  if (Ebene = 1)
3231    c := val1
3232  else
3233    c := val2
3234  send % "{blind}" . c
3235  if (PriorDeadKey = "comp")
3236    CompKey := c
3237}
3238
3239
3240/*
3241   ------------------------------------------------------
3242   Methoden zum Senden von Unicode-Zeichen
3243   ------------------------------------------------------
3244*/
3245
3246
3247/************************************************************
3248  Alter Weg � Copy/Paste �ber die Zwischenablage
3249************************************************************/
3250
3251/*
3252Unicode(code)
3253{
3254   saved_clipboard := ClipboardAll
3255   Transform, Clipboard, Unicode, %code%
3256   sendplay ^v
3257   Clipboard := saved_clipboard
3258}
3259
3260BSUnicode(code)
3261{
3262   saved_clipboard := ClipboardAll
3263   Transform, Clipboard, Unicode, %code%
3264   sendplay {bs}^v
3265   Clipboard := saved_clipboard
3266}
3267*/
3268
3269
3270/************************************************************
3271  Neuer Weg � Benutzung der entsprechenden Win32-API-Methode
3272************************************************************/
3273
3274
3275
3276/*
3277   ------------------------------------------------------
3278   BildschirmTastatur
3279   ------------------------------------------------------
3280*/
3281guiErstellt = 0
3282alwaysOnTop = 1
3283
3284*F1::
3285  if (isMod4Pressed() and zeigeBildschirmTastatur)
3286    goto Switch1
3287  else
3288    send {blind}{F1}
3289return
3290
3291*F2::
3292  if (isMod4Pressed() and zeigeBildschirmTastatur)
3293    goto Switch2
3294  else
3295    send {blind}{F2}
3296return
3297
3298*F3::
3299  if (isMod4Pressed() and zeigeBildschirmTastatur)
3300    goto Switch3
3301  else
3302    send {blind}{F3}
3303return
3304
3305*F4::
3306  if (isMod4Pressed() and zeigeBildschirmTastatur)
3307    goto Switch4
3308  else
3309    send {blind}{F4}
3310return
3311
3312*F5::
3313  if (isMod4Pressed() and zeigeBildschirmTastatur)
3314    goto Switch5
3315  else
3316    send {blind}{F5}
3317return
3318
3319*F6::
3320  if (isMod4Pressed() and zeigeBildschirmTastatur)
3321    goto Switch6
3322  else
3323    send {blind}{F6}
3324return
3325
3326*F7::
3327  if (isMod4Pressed() and zeigeBildschirmTastatur)
3328    goto Show
3329  else
3330    send {blind}{F7}
3331return
3332
3333*F8::
3334  if (isMod4Pressed() and zeigeBildschirmTastatur)
3335    goto ToggleAlwaysOnTop
3336  else
3337    send {blind}{F8}
3338return
3339
3340Switch1:
3341  tImage := ResourceFolder . "\ebene1.png"
3342  goto Switch
3343Return
3344
3345Switch2:
3346  tImage := ResourceFolder . "\ebene2.png"
3347  goto Switch
3348Return
3349
3350Switch3:
3351  tImage := ResourceFolder . "\ebene3.png"
3352  goto Switch
3353Return
3354
3355Switch4:
3356  tImage := ResourceFolder . "\ebene4.png"
3357  goto Switch
3358Return
3359
3360Switch5:
3361  tImage := ResourceFolder . "\ebene5.png"
3362  goto Switch
3363Return
3364
3365Switch6:
3366  tImage := ResourceFolder . "\ebene6.png"
3367  goto Switch
3368Return
3369
3370Switch:
3371  if (guiErstellt)
3372  {
3373     if (Image = tImage)
3374        goto Close
3375     else
3376     {
3377       Image := tImage
3378       SetTimer, Refresh
3379     }
3380  }
3381  else
3382  {
3383    Image := tImage
3384    goto Show   
3385  }
3386Return
3387
3388Show:
3389  if (guiErstellt)
3390  {
3391     goto Close
3392  }
3393  else
3394  {
3395    if (Image = "")
3396    {
3397      Image := ResourceFolder . "\ebene1.png"
3398    }     
3399    yPosition := A_ScreenHeight -270
3400    Gui, Color, FFFFFF
3401    Gui, Add, Button, xm+5 gSwitch1, F1
3402    Gui, Add, Text, x+5, kleine Buchstaben
3403    Gui, Add, Button, xm+5 gSwitch2, F2
3404    Gui, Add, Text, x+5, gro�e Buchstaben
3405    Gui, Add, Button, xm+5 gSwitch3, F3
3406    Gui, Add, Text, x+5, Satz-/Sonderzeichen
3407    Gui, Add, Button, xm+5 gSwitch4, F4
3408    Gui, Add, Text, x+5, Zahlen / Steuerung
3409    Gui, Add, Button, xm+5 gSwitch5, F5
3410    Gui, Add, Text, x+5, Sprachen
3411    Gui, Add, Button, xm+5 gSwitch6, F6
3412    Gui, Add, Text, x+5, Mathesymbole
3413    Gui, Add, Button, xm+5 gShow, F7
3414    Gui, Add, Text, x+5, An /
3415    Gui, Add, Text, y+3, Aus
3416    Gui, Add, Button, x+10 y+-30 gShow, F8
3417    Gui, Add, Text, x+5, OnTop
3418    Gui, Add, Picture,AltSubmit ys w564 h200 vPicture, %Image%
3419    Gui, +AlwaysOnTop
3420    Gui, Show, y%yposition% Autosize
3421;    SetTimer, Refresh
3422    guiErstellt = 1
3423  }
3424Return
3425
3426Close:
3427  guiErstellt = 0
3428  Gui, Destroy
3429Return
3430
3431Refresh:
3432   If (Image != OldImage)
3433   {
3434      GuiControl, , Picture, %Image%
3435      OldImage := Image
3436   }
3437Return
3438
3439ToggleAlwaysOnTop:
3440    if (alwaysOnTop)
3441    {
3442      Gui, -AlwaysOnTop
3443      alwaysOnTop = 0   
3444    }
3445    else
3446    {
3447      Gui, +AlwaysOnTop
3448      alwaysOnTop = 1
3449    }
3450Return
3451 ; Ende der BildschirmTastatur
3452
3453
3454/*
3455   ------------------------------------------------------
3456   Shift+Pause "pausiert" das Script.
3457   ------------------------------------------------------
3458*/
3459
3460*pause::
3461Suspend, Permit
3462   if isshiftpressed()
3463     goto togglesuspend
3464   else
3465     send {blind}{pause}
3466return
3467
3468; ------------------------------------
3469
3470^.::einHandNeo := not(einHandNeo)  ; Punkt
3471^,::lernModus := not(lernModus)    ; Komma
3472
3473
3474
3475togglesuspend:
3476   if A_IsSuspended
3477   {
3478      menu, tray, rename, %enable%, %disable%
3479      menu, tray, tip, %name%
3480      if (iconBenutzen)
3481          menu, tray, icon, %ResourceFolder%\neo.ico,,1 
3482      suspend , off ; Schaltet Suspend aus -> NEO
3483   }
3484   else
3485   {
3486      menu, tray, rename, %disable%, %enable%
3487      menu, tray, tip, %name% : Deaktiviert
3488      if (iconBenutzen)
3489         menu, tray, icon, %ResourceFolder%\neo_disabled.ico,,1
3490      suspend , on  ; Schaltet Suspend ein -> QWERTZ
3491   }
3492
3493return
3494
3495
3496help:
3497   Run, %A_WinDir%\hh mk:@MSITStore:autohotkey.chm
3498return
3499
3500
3501about:
3502   msgbox, 64, %name% � Ergonomische Tastaturbelegung,
3503   (
3504   %name%
3505   `nDas Neo-Layout ersetzt das �bliche deutsche
3506   Tastaturlayout mit der Alternative Neo,
3507   beschrieben auf http://neo-layout.org/.
3508   `nDazu sind keine Administratorrechte n�tig.
3509   `nWenn Autohotkey aktiviert ist, werden alle Tastendrucke
3510   abgefangen und statt dessen eine �bersetzung weitergeschickt.
3511   `nDies geschieht transparent f�r den Anwender,
3512   es muss nichts installiert werden.
3513   `nDie Zeichen�bersetzung kann leicht �ber das Icon im
3514   Systemtray deaktiviert werden.  `n
3515   )
3516return
3517
3518
3519neo:
3520   run http://neo-layout.org/
3521return
3522
3523autohotkey:
3524   run http://autohotkey.com/
3525return
3526
3527open:
3528   ListLines ; shows the Autohotkey window
3529return
3530
3531edit:
3532   edit
3533return
3534
3535reload:
3536   Reload
3537return
3538
3539hide:
3540   menu, tray, noicon
3541return
3542
3543exitprogram:
3544   exitapp
3545return
3546
Note: See TracBrowser for help on using the browser.