root/windows/autohotkey/neo20.ahk @ 674

Revision 674, 123.8 KB (checked in by stmayer, 5 years ago)

ahk: „all-in-one“ bei Dateiname entfernt, .bat entsprechend angepasst

Line 
1/*
2*******************************************
3
4
5
6WICHTIGE WARNUNG:
7
8Dies ist inzwischen eine automatisch generierte
9Datei! Sie wird regelm��ig �berschrieben und
10sollte deshalb nicht mehr direkt bearbeitet werden!
11
12
13
14DIE AUSF�HRBARE DATEI AKTUALISIEREN:
15
16Um die neo20-all-in-one.exe auf den neuesten Stand zu
17bringen, reicht (wenn Autohotkey im Standardverzeichnis
18installiert wurde) ein Doppelklick auf die Batch-Datei
19Build-Update.bat
20
21
22
23HINWEISE F�R AHK-ENTWICKLER:
24
25Anstatt dieser Datei m�ssen die Dateien/Module im
26Source-Unterverzeichnis bearbeitet werden, etwa:
27Source\Changelog-and-Todo.ahk
28Source\Keys-Neo.ahk
29Source\Keys-Qwert-to-Neo.ahk
30Source\Methods-Layers.ahk
31Source\Methods-Lights.ahk
32
33Um die gemachten �nderungen zu testen, sollte die Datei
34Source\All.ahk
35verwendet werden, die alle Module einbindet und
36regul�r durch einen Doppelklick mit dem AHK-Interpreter
37gestartet werden kann.
38
39Der grosse Vorteil dieser Methode liegt daran, dass sich die
40Zeilennummern eventueller Fehlermeldungen nicht mehr auf
41die grosse "vereinigte" AHK-Datei, sondern auf die tats�ch-
42lich relevanten Module beziehen, z.B.:
43
44Error at line 64 in #include file "C:\...\autohotkey\Source\Methods-Lights.ahk"
45Line Text: CTL_CODE_LED(p_device_type, p_function, p_method, p_access)
46Error: Functions cannot contain functions.
47The programm will exit.
48
49
50
51AHK-LINKS
52
53Eine kurze Einf�hrung (Installation und Beispielscipt) findet man etwa auf
54http://www.kikizas.net/en/usbapps.ahk.html
55
56Eine alphabetische Liste aller erlaubten Kommandos findet man online unter
57http://www.autohotkey.com/docs/commands.htm
58
59
60
61*******************************************
62*/
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96/*
97*******************************************
98DU BIST GEWARNT WORDEN!
99*******************************************
100*/
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128/*
129    Titel:        NEO 2.0 beta Autohotkey-Treiber
130    $Revision: 645 $
131    $Date: 2008-07-13 03:08:31 +0200 (So, 13 Jul 2008) $
132    Autor:        Stefan Mayer <stm (at) neo-layout.org>
133    Basiert auf:  neo20-all-in-one.ahk vom 29.06.2007
134       
135    TODO:         - ausgiebig testen... (besonders Vollst�ndigkeit bei Deadkeys)
136                  - Bessere L�sung f�r das leeren von PriorDeadKey finden, damit die Sondertasten
137                    nicht mehr abgefangen werden m�ssen.
138                  - Testen ob die Capslockl�sung (siehe *1:: ebene 1) auch f�r Numpad gebraucht wird
139                  - Sind Ebenen vom Touchpad noch richtig?
140                  - Die Bildschirmtastatur mit Mod4 deaktiviert den Mod4-Lock
141   
142    Ideen:        - Symbol �ndern (Neo-Logo abwarten)
143                  - bei Ebene 4 rechte Hand (Numpad) z.B. Numpad5 statt 5 senden
144
145    CHANGEHISTORY:
146
147                  Revision 624(von Martin Roppelt):
148                  - Lang-s-Tastatur (ein- und auszuschalten durch Mod4+�)
149                  Revision 616 (von Dennis Heidsiek):
150                  - Der nicht funktionierende Mod5-Lock-Fix wurde wieder entfernt, da
151                    er sogar neue Fehler produzierte.
152                  Revision 615 (von Dennis Heidsiek):
153                  - Erfolgloser Versuch, den Mod4-Lock wiederherzustellen
154                    (durch eine Tilde vor den Scancodes der Bildschirmtastatur).
155                  - Rechtschreibfehler korrigiert.
156                  - Zwei AHK-Links eingef�gt.
157                  Revision 609 (von Dennis Heidsiek):
158                  - Vorl�ufiger Abschluss der AHK-Modularisierung.
159                  - Bessere Testm�glichkeit �All.ahk� f�r AHK-Entwickler hinzugef�gt, bei der
160                    sich die Zeilenangaben in Fehlermeldungen auf die tats�chlichen Module und
161                    nicht auf das gro�e �vereinigte� Skript beziehen.
162                  Revision 608 (von Martin Roppelt):
163                  - Rechtschreibfehler korrigiert und Dateinamen aktualisiert und sortiert.
164                  Revision 590 (von Dennis Heidsiek):
165                  - Erste technische Vorarbeiten zur logischen Modularisierung des viel
166                    zu lange gewordenen AHK-Quellcodes.
167                  - Neue Batch-Datei Build-Update.bat zur einfachen Aktualisierung der EXE-Datei
168                  Revision 583 (von Dennis Heidsiek):
169                  - Kleinere Korrekturen (Mod3+Numpad5, Mod5+Numpad5 und Mod3+Numpad9
170                    stimmen wieder mit der Referenz �berein).
171                  Revision 580 (von Matthias Berg):
172                  - Bildschirmtastatur jetzt mit Mod4+F* statt Strg+F*, dies deaktiviert
173                    jedoch leider den Mod4-Lock
174                  Revision 570 (von Matthias Berg):
175                  - Hotkeys f�r einHandNeo und lernModus durch entsprechende ScanCodes ersetzt
176                  Revision 568 (von Matthias Berg):
177                  - Sonderzeichen, Umlaute, z und y durch ScanCodes ersetzt
178                    * jetzt wird auch bei eingestelltem US Layout Neo verwendet.
179                      (z.B. f�r Chinesische InputMethodEditors)
180                    * rechter Mod3 geht noch nicht bei US Layout (weder ScanCode noch "\")
181                  Revision 567 (von Dennis Heidsiek):
182                  - Aktivierter Mod4 Lock wird jetzt �ber die Rollen-LED des Keybord angezeigt
183                    (analog zu CapsLock), die NUM-LED beh�lt ihr bisheriges Verhalten
184                  - Neue Option im Skript: UseMod4Light
185                  Revision 561 (von Matthias Berg):
186                  - Ebene 4 Tab verh�lt sich jetzt wie das andere Tab dank "goto neo_tab"
187                  Revision 560 (von Dennis Heidsiek):
188                  - Neue Option im Skript: bildschirmTastaturEinbinden bindet die PNG-Bilder der
189                    Bildschirmtastur mit in die exe-Datei ein, so dass sich der Benutzer nur eine Datei
190                    herunterladen muss
191                  Revision 559 (von Matthias Berg):
192                  - Shift+Alt+Tab Problem gel�st (muss noch mehr auf Nebeneffekte getestet werden)
193                  Revision 558 (von Matthias Berg):
194                  - Icon-Bug behoben
195                    * Hotkeys d�rfen nicht vor der folgenden Zeile stehen:
196                     "menu, tray, icon, neo.ico,,1"
197                  - lernModus-Konfigurations-Bug behoben: or statt and(not)
198                  - Ein paar leere Else-F�lle eingebaut (Verst�ndlichkeit, m�gliche Compilerprobleme vermeiden)   
199                  Revision 556 (von Matthias Berg):
200                  - lernModus (an/aus mit Strg+Komma)
201                    * im Skript konfigurierbar
202                    * Schaltet z.B. Qwertz Tasten aus, die es auf der 4. Ebene gibt (Return, Backspace,...)
203                    * Kann auch Backspace und/oder Entfernen der 4. Ebene ausschalten (gut zum Lernen richtig
204                      zu schreiben)
205                  - Bug aufgetaucht: Icons werden nicht mehr angezeigt
206                  Revision 544 (von Stefan Mayer):
207                  - ,.:; auf dem Mod4-Ziffernblock an die aktuelle Referenz angepasst
208                  - Versionen von rho, theta, kappa und phi an die aktuelle Referenz angepasst
209                  Revision 542 (von Matthias Berg):
210                  - bei EinHandNeo ist jetzt Space+y auch Mod4
211                  - AltGr-Bug  hoffentlich wieder behoben. Diesmal mit extra altGrPressed Variable
212                  - nurEbenenFuenfUndSechs umbenannt in ahkTreiberKombi und auf Ebene 4 statt 5 und 6 ge�ndert
213                  Revision 540 (von Matthias Berg):
214                  - stark �berarbeitet um Wartbarkeit zu erh�hen und Redundanz zu veringern
215                  - nurEbenenFuenfUndSechs sollte nun auch auf Neo Treiber statt Qwertz laufen
216                    * aber es muss noch jemand testen
217                    * Problem: was kann man abfangen, wenn eine tote Taste gedr�ckt wird
218                 - einHandNeo:
219                    * An-/Ausschalten mit STRG+Punkt
220                    * Buchstaben der rechten Hand werden mit Space zur linken Hand
221                    * Nebeneffekt: es gibt beim Festhalten von Space keine wiederholten Leerzeichen mehr
222                  Revision 532 (von Matthias Berg):
223                  - BildschirmTastatur
224                    * aktiviert mit strg+F1 bis 7 schaltet Keyboard ein oder aus
225                    * strg+F7 zeigt die zuletzt angezeigte Ebene an (und wieder aus).
226                    * strg+F8 schaltet AlwaysOnTop um   
227                  Revision 529 (von Stefan Mayer):
228                  - Icon wird automatisch geladen, falls .ico-Dateien im selbem Ordner
229                  - in der .exe sind die .ico mitgespeichert und werden geladen
230                  Revision 528 (von Matthias Berg):
231                  - Neo-Icon
232                  - Neo-Prozess jetzt automatisch auf hoher Prioritaet
233                    (siehe globale Schalter)
234                  - Mod3-Lock (nur wenn rechtes Mod3 zuerst gedr�ckt wird, andere L�sung f�hrte zum Caps-Bug)
235                  - Mod4-Lock (nur wenn das linke Mod4 zuerst gedr�ckt wird, andere L�sung f�hte zum AltGr-Bug)
236                  - Ein paar falsche Zeichen korrigiert
237                  Revision 527 (von Matthias Berg):
238                  - AltGr Problem hoffentlich behoben
239                  - Umschalt+Mod4 Bug behoben
240                  Revision 526 (von Matthias Berg):
241                  - Ebenen 1 bis 4 ausschalten per Umschalter siehe erste Codezeile
242                     nurEbenenFuenfUndSechs = 0
243                  - Mod4-Lock durch Mod4+Mod4
244                  - EbenenAktualisierung neu geschrieben
245                  - Ebene 6 �ber Mod3+Mod4
246                  - Ebenen (besonders Matheebene) an Referenz angepasst
247                    (allerdings kaum um Ebenen 1&2 gek�mmert, besonders Compose k�nnte noch �berholt werden)
248                  Revision 525 (von Matthias Berg):
249                  - Capslock bei Zahlen und Sonderzeichen ber�cksichtigt
250                  Revision 524 (von Matthias Berg):
251                  - umgekehrtes ^ f�r o, a, �,i  sowie f�r die grossen vokale ( 3. ton chinesisch)
252                    � damit wird jetzt PinYin vollst�ndig unterst�tzt caron, macron, akut, grave auf uiaeo�
253                  - Sonderzeichen senden wieder blind -> Shortcuts funktionieren, Capslock ist leider Shiftlock
254                  Revision 523 (von Matthias Berg):
255                        - CapsLock geht jetzt auch bei allen Zeichen ('send Zeichen' statt 'send {blind} Zeichen')
256                  - vertikale Ellipse eingebaut
257                  - Umschalt+Umschalt f�r Capslock statt Mod3+Mod3
258                  - bei Suspend wird jetzt wirklich togglesuspend aufgerufen (auch beim aktivieren per shift+pause)
259                  Revsion 490 (von Stefan Mayer):
260                  - SUBSCRIPT von 0 bis 9 sowie (auf Ziffernblock) + und -
261                    � auch bei Ziffernblock auf der 5. Ebene
262                  - Kein Parsen �ber die Zwischenablage mehr
263                  - Vista-kompatibel
264                  - Compose-Taste
265                    � Br�che (auf Zahlenreihe und Hardware-Ziffernblock)
266                    � r�mische Zahlen
267                    � Ligaturen und Copyright
268*/
269
270
271
272/******************
273 Globale Schalter *
274*******************
275*/
276
277; Im folgenden gilt (soweit nicht anders angegeben) Ja = 1, Nein = 0:
278ahkTreiberKombi := 0             ; Sollen Ebenen 1-4 ignoriert werden? (kann z.B. vom dll Treiber �bernommen werden)
279einHandNeo := 0                  ; Soll der Treiber im Einhandmodus betrieben werden?
280lernModus := 0                   ; Soll der Lernmodus aktiviert werden?
281bildschirmTastaturEinbinden := 1 ; Sollen die Bilder f�r die Bildschirmtastatur in die EXE-Datei miteingebunden werden (Nachteil: gr�ssere Dateigr�sse, Vorteil: Referenz f�r Anf�nger stets einfach verf�gbar)
282UseMod4Light := 1                ; Aktivierter Mod4 Lock wird �ber die Rollen-LED des Keybord angezeigt (analog zu CapsLock)
283LangSTastatur := 0               ; Sollen Lang-s auf s, s auf � und � auf M3+� gelegt werden?
284
285Process, Priority,, High
286
287
288/*************************
289 Recourcen-Verwaltung    *
290**************************
291*/
292
293; Versuche zuerst, eventuell in die EXE eingebundenen Dateien zu extrahieren
294FileInstall, neo.ico, neo.ico, 1
295FileInstall, neo_disabled.ico, neo_disabled.ico, 1
296
297if(bildschirmTastaturEinbinden==1) {
298   FileInstall, ebene1.png, ebene1.png, 1
299   FileInstall, ebene2.png, ebene2.png, 1
300   FileInstall, ebene3.png, ebene3.png, 1
301   FileInstall, ebene4.png, ebene4.png, 1
302   FileInstall, ebene5.png, ebene5.png, 1
303   FileInstall, ebene6.png, ebene6.png, 1
304}
305
306; Benutze die Dateien (soweit sie vorhanden sind)
307if ( FileExist("ebene1.png") && FileExist("ebene2.png") && FileExist("ebene3.png") && FileExist("ebene4.png") && FileExist("ebene5.png") && FileExist("ebene6.png") )
308  zeigeBildschirmTastatur = 1
309
310if ( FileExist("neo.ico") && FileExist("neo_disabled.ico") )
311  iconBenutzen = 1
312
313
314/*************************
315 lernModus Konfiguration *
316 nur relevant wenn       *
317 lernModus = 1           *
318 Strg+Komma schaltet um  *
319**************************
320*/
321; 0 = aus, 1 = an
322
323
324; die Nachfolgenden sind n�tzlich um sich die Qwertz-Tasten abzugew�hnen, da alle auf der 4. Ebene vorhanden.
325lernModus_std_Return = 0
326lernModus_std_Backspace = 0
327lernModus_std_PgUp = 0
328lernModus_std_PgDn = 0
329lernModus_std_Einf = 0
330lernModus_std_Entf = 0
331lernModus_std_Pos0 = 0
332lernModus_std_Ende = 0
333lernModus_std_Hoch = 0
334lernModus_std_Runter = 0
335lernModus_std_Links = 0
336lernModus_std_Rechts = 0
337lernModus_std_ZahlenReihe = 0
338
339
340
341; im folgenden kann man auch noch ein paar Tasten der 4. Ebene deaktivieren
342; n�tzlich um sich zu zwingen, richtig zu schreiben
343lernModus_neo_Backspace = 0
344lernModus_neo_Entf = 1
345
346
347 
348
349; aus Noras script kopiert:
350#usehook on
351#singleinstance force
352#LTrim
353  ; Quelltext kann einger�ckt werden,
354  ; msgbox ist trotzdem linksb�ndig
355
356SetTitleMatchMode 2
357SendMode Input 
358
359name    = Neo 2.0
360enable  = Aktiviere %name%
361disable = Deaktiviere %name%
362
363; �berpr�fung auf deutsches Tastaturlayout
364; ----------------------------------------
365
366regread, inputlocale, HKEY_CURRENT_USER, Keyboard Layout\Preload, 1
367regread, inputlocalealias, HKEY_CURRENT_USER
368     , Keyboard Layout\Substitutes, %inputlocale%
369if inputlocalealias <>
370   inputlocale = %inputlocalealias%
371if inputlocale <> 00000407
372{
373   suspend   
374   regread, inputlocale, HKEY_LOCAL_MACHINE
375     , SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%
376     , Layout Text
377   msgbox, 48, Warnung!,
378     (
379     Nicht kompatibles Tastaturlayout:   
380     `t%inputlocale%   
381     `nDas deutsche QWERTZ muss als Standardlayout eingestellt 
382     sein, damit %name% wie erwartet funktioniert.   
383     `n�ndern Sie die Tastatureinstellung unter
384     `tSystemsteuerung   
385     `t-> Regions- und Sprachoptionen   
386     `t-> Sprachen
387     `t-> Details...   `n
388     )
389   exitapp
390}
391
392
393
394; Men� des Systray-Icons
395; ----------------------
396
397if (iconBenutzen)
398   menu, tray, icon, neo.ico,,1
399menu, tray, nostandard
400menu, tray, add, �ffnen, open
401   menu, helpmenu, add, About, about
402   menu, helpmenu, add, Autohotkey-Hilfe, help
403   menu, helpmenu, add
404   menu, helpmenu, add, http://&autohotkey.com/, autohotkey
405   menu, helpmenu, add, http://www.neo-layout.org/, neo
406menu, tray, add, Hilfe, :helpmenu
407menu, tray, add
408menu, tray, add, %disable%, togglesuspend
409menu, tray, default, %disable%
410menu, tray, add
411menu, tray, add, Edit, edit
412menu, tray, add, Reload, reload
413menu, tray, add
414menu, tray, add, Nicht im Systray anzeigen, hide
415menu, tray, add, %name% beenden, exitprogram
416menu, tray, tip, %name%
417
418
419/*
420   Variablen initialisieren
421*/
422
423Ebene = 1
424PriorDeadKey := ""
425
426
427 
428
429
430/*
431   EinHandNeo
432*/
433spacepressed := 0
434keypressed:= 0
435
436; Reihe 1
437gespiegelt_7 = neo_6
438gespiegelt_8 = neo_5
439gespiegelt_9 = neo_4
440gespiegelt_0 = neo_3
441gespiegelt_strich = neo_2
442gespiegelt_tot2 = neo_1
443
444; Reihe 2
445gespiegelt_k = neo_w
446gespiegelt_h = neo_c
447gespiegelt_g = neo_l
448gespiegelt_f = neo_v
449gespiegelt_q = neo_x
450gespiegelt_sz = neo_tab
451gespiegelt_tot3 = neo_tot1
452
453; Reihe 3
454gespiegelt_s = neo_o
455gespiegelt_n = neo_e
456gespiegelt_r = neo_a
457gespiegelt_t = neo_i
458gespiegelt_d = neo_u
459
460; Reihe 4
461gespiegelt_b = neo_z
462gespiegelt_m = neo_p
463gespiegelt_komma = neo_�
464gespiegelt_punkt = neo_�
465gespiegelt_j = neo_�
466
467
468
469
470/*
471   ------------------------------------------------------
472   Modifier
473   ------------------------------------------------------
474*/
475
476
477; CapsLock durch Umschalt+Umschalt
478;*CapsLock::return ; Nichts machen beim Capslock release event (weil es Mod3 ist)
479
480*#::return ; Nichts machen beim # release event (weil es Mod3 ist) ; # = SC02B
481
482;RShift wenn vorher LShift gedr�ckt wurde
483LShift & ~RShift:: 
484      if GetKeyState("CapsLock","T")
485      {
486         setcapslockstate, off
487      }
488      else
489      {
490         setcapslockstate, on
491      }
492return
493
494;LShift wenn vorher RShift gedr�ckt wurde
495RShift & ~LShift::
496      if GetKeyState("CapsLock","T")
497      {
498         setcapslockstate, off
499      }
500      else
501      {
502         setcapslockstate, on
503      }
504return
505
506; Mod4-Lock durch Mod4+Mod4
507IsMod4Locked := 0
508< & *SC138::
509      if (IsMod4Locked)
510      {
511         MsgBox Mod4-Feststellung aufgebehoben
512         IsMod4Locked = 0
513         if (UseMod4Light==1)
514         {
515            KeyboardLED(1,"off")
516         }
517      }
518      else
519      {
520         MsgBox Mod4 festgestellt: Um Mod4 wieder zu l�sen dr�cke beide Mod4 Tasten gleichzeitig
521         IsMod4Locked = 1
522         if (UseMod4Light==1)
523         {
524            KeyboardLED(1,"on")
525         }
526      }
527return
528
529*SC138::
530 altGrPressed := 1
531return  ; Damit AltGr nicht extra etwas schickt und als stiller Modifier geht.
532*SC138 up::
533 altGrPressed := 0
534return
535
536; das folgende wird seltsamerweise nicht gebraucht :) oder f�hrt zum AltGr Bug; Umschalt+� (Mod4) Zeigt �
537SC138 & *<::
538      if (IsMod4Locked)
539      {
540         MsgBox Mod4-Feststellung aufgebehoben
541         IsMod4Locked = 0
542      }
543      else
544      {
545         MsgBox Mod4 festgestellt: Um Mod4 wieder zu l�sen dr�cke beide Mod4 Tasten gleichzeitig
546         IsMod4Locked = 1
547      }
548return
549
550 
551 ; Mod3-Lock durch Mod3+Mod3
552IsMod3Locked := 0
553SC02B & *Capslock::  ; #
554      if (IsMod3Locked)
555      {
556         MsgBox Mod3-Feststellung aufgebehoben
557         IsMod3Locked = 0
558      }
559      else
560      {
561         MsgBox Mod3 festgestellt: Um Mod3 wieder zu l�sen dr�cke beide Mod3 Tasten gleichzeitig
562         IsMod3Locked = 1
563      }
564return
565
566
567*Capslock:: return
568;Capslock::MsgBox hallo
569/*
570Capslock & *:
571      if (IsMod3Locked)
572      {
573         MsgBox Mod3-Feststellung aufgebehoben
574         IsMod3Locked = 0
575      }
576      else
577      {
578         MsgBox Mod3 festgestellt: Um Mod3 wieder zu l�sen dr�cke beide Mod3 Tasten gleichzeitig
579         IsMod3Locked = 1
580      }
581return
582*/
583 
584/*
585;  Wird nicht mehr gebraucht weil jetzt auf b (bzw. *n::)
586; KP_Decimal durch Mod4+Mod4
587*<::
588*SC138::
589   if GetKeyState("<","P") and GetKeyState("SC138","P")
590   {
591      send {numpaddot}
592   }
593return
594 
595*/
596
597
598
599/*
600   ------------------------------------------------------
601   QWERTZ->Neo umwandlung
602   ------------------------------------------------------
603*/
604; Reihe 1
605*SC029::goto neo_tot1  ; Zirkumflex ^
606*1::goto neo_1
607*2::goto neo_2
608*3::goto neo_3
609*4::goto neo_4
610*5::goto neo_5
611*6::goto neo_6
612*7::
613     if( not(einHandNeo) or not(spacepressed) )
614       goto neo_7
615     else
616      {
617        keypressed := 1
618        goto %gespiegelt_7%
619      }
620return
621*8::
622     if( not(einHandNeo) or not(spacepressed) )
623       goto neo_8
624     else
625      {
626        keypressed := 1
627        goto %gespiegelt_8%
628      }
629return
630*9::
631     if( not(einHandNeo) or not(spacepressed) )
632       goto neo_9
633     else
634      {
635        keypressed := 1
636        goto %gespiegelt_9%
637      }
638return
639*0::
640     if( not(einHandNeo) or not(spacepressed) )
641       goto neo_0
642     else
643      {
644        keypressed := 1
645        goto %gespiegelt_0%
646      }
647return
648*SC00C::  ; �
649  if ( not(ahkTreiberKombi) )
650  {
651       if( not(einHandNeo) or not(spacepressed) )
652       goto neo_strich
653     else
654      {
655        keypressed := 1
656        goto %gespiegelt_strich%
657      }
658   }
659  else
660  {
661     goto neo_sz   
662  }
663*SC00D::goto neo_tot2  ; Akut                   
664; Reihe 2
665*Tab::goto neo_tab
666*q::
667  if ( not(ahkTreiberKombi) )
668  {
669     goto neo_x
670  }
671  else
672  {
673     goto neo_q   
674  }
675*w::
676  if ( not(ahkTreiberKombi) )
677  {
678     goto neo_v
679  }
680  else
681  {
682     goto neo_w   
683  }
684*e::
685  if ( not(ahkTreiberKombi) )
686  {
687     goto neo_l
688  }
689  else
690  {
691     goto neo_e   
692  }
693*r::
694  if ( not(ahkTreiberKombi) )
695  {
696     goto neo_c
697  }
698  else
699  {
700     goto neo_r   
701  }
702*t::
703  if ( not(ahkTreiberKombi) )
704  {
705     goto neo_w
706  }
707  else
708  {
709     goto neo_t   
710  }
711*SC015::  ; z
712  if ( not(ahkTreiberKombi) )
713  {
714     if( not(einHandNeo) or not(spacepressed) )
715       goto neo_k
716     else
717      {
718        keypressed := 1
719        goto %gespiegelt_k%
720      }
721  }
722  else
723  {
724     goto neo_z   
725  }
726*u::
727  if ( not(ahkTreiberKombi) )
728  {
729     if( not(einHandNeo) or not(spacepressed) )
730       goto neo_h
731     else
732      {
733        keypressed := 1
734        goto %gespiegelt_h%
735      }
736  }
737  else
738  {
739     goto neo_u   
740  }
741*i::
742  if ( not(ahkTreiberKombi) )
743  {
744     if( not(einHandNeo) or not(spacepressed) )
745       goto neo_g
746     else
747      {
748        keypressed := 1
749        goto %gespiegelt_g%
750      }
751  }
752  else
753  {
754     goto neo_i   
755  }
756*o::
757  if ( not(ahkTreiberKombi) )
758  {
759     if( not(einHandNeo) or not(spacepressed) )
760       goto neo_f
761     else
762      {
763        keypressed := 1
764        goto %gespiegelt_f%
765      }
766  }
767  else
768  {
769     goto neo_o   
770  }
771*p::
772  if ( not(ahkTreiberKombi) )
773  {
774     if( not(einHandNeo) or not(spacepressed) )
775       goto neo_q
776     else
777      {
778        keypressed := 1
779        goto %gespiegelt_q%
780      }
781  }
782  else
783  {
784     goto neo_p   
785  }
786*SC01A:: ; �
787  if ( not(ahkTreiberKombi) )
788  {
789     if( not(einHandNeo) or not(spacepressed) )
790       goto neo_sz
791     else
792      {
793        keypressed := 1
794        goto %gespiegelt_sz%
795      }
796  }
797  else
798  {
799     goto neo_�   
800  }
801*SC01B::  ; +
802  if ( not(ahkTreiberKombi) )
803  {
804     if( not(einHandNeo) or not(spacepressed) )
805       goto neo_tot3
806     else
807      {
808        keypressed := 1
809        goto %gespiegelt_tot3%
810      }
811  }
812  else
813  { } ; this should never happen
814; Reihe 3
815*a::
816  if ( not(ahkTreiberKombi) )
817  {
818     goto neo_u
819  }
820  else
821  {
822     goto neo_a   
823  }
824*s::
825  if ( not(ahkTreiberKombi) )
826  {
827     goto neo_i
828  }
829  else
830  {
831     goto neo_s   
832  }
833*d::goto neo_a
834  if ( not(ahkTreiberKombi) )
835  {
836     goto neo_a
837  }
838  else
839  {
840     goto neo_d   
841  }
842*f::
843  if ( not(ahkTreiberKombi) )
844  {
845     goto neo_e
846  }
847  else
848  {
849     goto neo_f   
850  }
851*g::
852  if ( not(ahkTreiberKombi) )
853  {
854     goto neo_o
855  }
856  else
857  {
858     goto neo_g   
859  }
860*h::
861  if ( not(ahkTreiberKombi) )
862  {
863     if( not(einHandNeo) or not(spacepressed) )
864       goto neo_s
865     else
866      {
867        keypressed := 1
868        goto %gespiegelt_s%
869      }
870  }
871  else
872  {
873     goto neo_h   
874  }
875*j::
876  if ( not(ahkTreiberKombi) )
877  {
878     if( not(einHandNeo) or not(spacepressed) )
879       goto neo_n
880     else
881      {
882        keypressed := 1
883        goto %gespiegelt_n%
884      }
885  }
886  else
887  {
888     goto neo_j   
889  }
890*k::
891  if ( not(ahkTreiberKombi) )
892  {
893     if( not(einHandNeo) or not(spacepressed) )
894       goto neo_r
895     else
896      {
897        keypressed := 1
898        goto %gespiegelt_r%
899      }
900  }
901  else
902  {
903     goto neo_k   
904  }
905*l::
906  if ( not(ahkTreiberKombi) )
907  {
908     if( not(einHandNeo) or not(spacepressed) )
909       goto neo_t
910     else
911      {
912        keypressed := 1
913        goto %gespiegelt_t%
914      }
915  }
916  else
917  {
918     goto neo_l   
919  }
920*SC027::  ; �
921  if ( not(ahkTreiberKombi) )
922  {
923     if( not(einHandNeo) or not(spacepressed) )
924       goto neo_d
925     else
926      {
927        keypressed := 1
928        goto %gespiegelt_d%
929      }
930  }
931  else
932  {
933     goto neo_�   
934  }
935*SC028::  ; �
936  if ( not(ahkTreiberKombi) )
937  {
938     goto neo_y
939  }
940  else
941  {
942     goto neo_�
943  }
944; Reihe 4
945*SC02C::  ; y
946  if ( not(ahkTreiberKombi) )
947  {
948     goto neo_�
949  }
950  else
951  {
952     goto neo_y   
953  }
954*x::
955  if ( not(ahkTreiberKombi) )
956  {
957     goto neo_�
958  }
959  else
960  {
961     goto neo_x   
962  }
963*c::
964  if ( not(ahkTreiberKombi) )
965  {
966     goto neo_�
967  }
968  else
969  {
970     goto neo_c
971  }
972*v::
973  if ( not(ahkTreiberKombi) )
974  {
975     goto neo_p
976  }
977  else
978  {
979     goto neo_v
980  }
981*b::
982  if ( not(ahkTreiberKombi) )
983  {
984     goto neo_z
985  }
986  else
987  {
988     goto neo_b
989  }
990*n::
991  if ( not(ahkTreiberKombi) )
992  {
993     if( not(einHandNeo) or not(spacepressed) )
994       goto neo_b
995     else
996      {
997        keypressed := 1
998        goto %gespiegelt_b%
999      }
1000  }
1001  else
1002  {
1003     goto neo_n
1004  }
1005*m::
1006     if( not(einHandNeo) or not(spacepressed) )
1007       goto neo_m
1008     else
1009      {
1010        keypressed := 1
1011        goto %gespiegelt_m%
1012      }
1013return
1014*SC033::  ; Komma ,
1015     if( not(einHandNeo) or not(spacepressed) )
1016       goto neo_komma
1017     else
1018      {
1019        keypressed := 1
1020        goto %gespiegelt_komma%
1021      }
1022return
1023*SC034::  ; Punkt .
1024     if( not(einHandNeo) or not(spacepressed) )
1025       goto neo_punkt
1026     else
1027      {
1028        keypressed := 1
1029        goto %gespiegelt_punkt%
1030      }
1031return
1032*SC035::  ; Minus -
1033  if ( not(ahkTreiberKombi) )
1034  {
1035     if( not(einHandNeo) or not(spacepressed) )
1036       goto neo_j
1037     else
1038      {
1039        keypressed := 1
1040        goto %gespiegelt_j%
1041      }
1042  }
1043  else
1044  {
1045     goto neo_strich
1046  }
1047; Numpad
1048*NumpadDiv::goto neo_NumpadDiv
1049*NumpadMult::goto neo_NumpadMult
1050*NumpadSub::goto neo_NumpadSub
1051*NumpadAdd::goto neo_NumpadAdd
1052*NumpadEnter::goto neo_NumpadEnter
1053*Numpad7::goto neo_Numpad7
1054*Numpad8::goto neo_Numpad8
1055*Numpad9::goto neo_Numpad9
1056*Numpad4::goto neo_Numpad4
1057*Numpad5::goto neo_Numpad5
1058*Numpad6::goto neo_Numpad6
1059*Numpad1::goto neo_Numpad1
1060*Numpad2::goto neo_Numpad2
1061*Numpad3::goto neo_Numpad3
1062*Numpad0::goto neo_Numpad0
1063*NumpadDot::goto neo_NumpadDot
1064*NumpadHome::goto neo_NumpadHome
1065*NumpadUp::goto neo_NumpadUp
1066*NumpadPgUp::goto neo_NumpadPgUp
1067*NumpadLeft::goto neo_NumpadLeft
1068*NumpadClear::goto neo_NumpadClear
1069*NumpadRight::goto neo_NumpadRight
1070*NumpadEnd::goto neo_NumpadEnd
1071*NumpadDown::goto neo_NumpadDown
1072*NumpadPgDn::goto neo_NumpadPgDn
1073*NumpadIns::goto neo_NumpadIns
1074*NumpadDel::goto neo_NumpadDel
1075
1076
1077
1078/*
1079Die eigentliche NEO-Belegung und der Hauptteil des AHK-Treibers.
1080
1081
1082   Ablauf bei toten Tasten:
1083   1. Ebene Aktualisieren
1084   2. Abh�ngig von der Variablen "Ebene" Zeichen ausgeben und die Variable "PriorDeadKey" setzen
1085   
1086   Ablauf bei "untoten" Tasten:
1087   1. Ebene Aktualisieren
1088   2. Abh�ngig von den Variablen "Ebene" und "PriorDeadKey" Zeichen ausgeben
1089   3. "PriorDeadKey" mit leerem String �berschreiben
1090
1091   ------------------------------------------------------
1092   Reihe 1
1093   ------------------------------------------------------
1094*/
1095
1096
1097neo_tot1:
1098   EbeneAktualisieren()
1099   if Ebene = 1
1100   {
1101      SendUnicodeChar(0x02C6) ; circumflex, tot
1102      PriorDeadKey := "c1"
1103   }
1104   else if Ebene = 2
1105   {
1106      SendUnicodeChar(0x02C7) ; caron, tot
1107      PriorDeadKey := "c2"
1108   }
1109   else if Ebene = 3
1110   {
1111      SendUnicodeChar(0x02D8) ; brevis
1112      PriorDeadKey := "c3"
1113   }
1114   else if Ebene = 4
1115   {
1116      SendUnicodeChar(0x00B7) ; Mittenpunkt, tot
1117      PriorDeadKey := "c5"
1118   }
1119   else if Ebene = 5
1120   {
1121      send -                  ; querstrich, tot
1122      PriorDeadKey := "c4"
1123   }
1124   else if Ebene = 6
1125   {
1126      Send .                  ; punkt darunter (colon)
1127      PriorDeadKey := "c6"
1128   }
1129return
1130
1131neo_1:
1132   EbeneAktualisieren()
1133   if Ebene = 1
1134   {
1135      if (PriorDeadKey = "c1")          ; circumflex 1
1136         BSSendUnicodeChar(0x00B9)
1137      else if (PriorDeadKey = "c4")       ; toter -
1138         BSSendUnicodeChar(0x2081)
1139      else if (CompKey = "r_small_1")
1140         Comp3UnicodeChar(0x217A)          ; r�misch xi
1141      else if (CompKey = "r_capital_1")
1142         Comp3UnicodeChar(0x216A)          ; r�misch XI
1143      else
1144       { 
1145         if GetKeyState("CapsLock","T")
1146         {
1147           if (IsModifierPressed())
1148           {
1149             send {blind}1
1150           }
1151           else
1152           {
1153              send 1
1154           }   
1155         }
1156         else {
1157            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1158            {
1159                send {blind}1
1160            }
1161         }
1162       }
1163      if (PriorDeadKey = "comp")
1164         CompKey := "1"
1165      else if (CompKey = "r_small")
1166         CompKey := "r_small_1"
1167      else if (CompKey = "r_capital")
1168         CompKey := "r_capital_1"
1169      else
1170         CompKey := ""
1171   }
1172   else if Ebene = 2
1173   {
1174      send �
1175      CompKey := ""
1176   }
1177   else if Ebene = 3
1178   {
1179      SendUnicodeChar(0x00B9) ; 2 Hochgestellte
1180      CompKey := ""
1181   }
1182   else if Ebene = 4
1183   {
1184      SendUnicodeChar(0x2022) ; bullet
1185      CompKey := ""
1186   }
1187   else if Ebene = 5
1188   {
1189      SendUnicodeChar(0x2640) ; Piktogramm weiblich
1190      CompKey := ""
1191   }
1192   else if Ebene = 6
1193   {
1194      SendUnicodeChar(0x00AC) ; Nicht-Symbol
1195      CompKey := ""
1196   }
1197   PriorDeadKey := ""
1198return
1199
1200neo_2:
1201   EbeneAktualisieren()
1202   if Ebene = 1
1203   {
1204      if (PriorDeadKey = "c1")          ; circumflex
1205         BSSendUnicodeChar(0x00B2)
1206      else if (PriorDeadKey = "c4")       ; toter -
1207         BSSendUnicodeChar(0x2082)
1208      else if (CompKey = "r_small")
1209         CompUnicodeChar(0x2171)          ; r�misch ii
1210      else if (CompKey = "r_capital")
1211         CompUnicodeChar(0x2161)          ; r�misch II
1212      else if (CompKey = "r_small_1")
1213         Comp3UnicodeChar(0x217B)          ; r�misch xii
1214      else if (CompKey = "r_capital_1")
1215         Comp3UnicodeChar(0x216B)          ; r�misch XII
1216      else
1217       { 
1218         if GetKeyState("CapsLock","T")
1219         {
1220           if (IsModifierPressed())
1221           {
1222             send {blind}2
1223           }
1224           else
1225           {
1226              send 2
1227           }
1228               
1229         }
1230         else {
1231            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1232            {
1233                send {blind}2
1234            }
1235         }
1236       }
1237      if (PriorDeadKey = "comp")
1238         CompKey := "2"
1239      else
1240         CompKey := ""         
1241   }
1242   else if Ebene = 2
1243   {
1244      SendUnicodeChar(0x2116) ; numero
1245      CompKey := ""
1246   }
1247   else if Ebene = 3
1248   {   
1249      SendUnicodeChar(0x00B2) ; 2 Hochgestellte
1250      CompKey := ""
1251   }
1252   else if Ebene = 4
1253   {
1254      SendUnicodeChar(0x2023) ; aufzaehlungspfeil
1255      CompKey := ""
1256   }
1257   else if Ebene = 5
1258   {
1259      SendUnicodeChar(0x26A5) ; Piktogramm Zwitter
1260      CompKey := ""
1261   }
1262   else if Ebene = 6
1263   {
1264      SendUnicodeChar(0x2228) ; Logisches Oder
1265      CompKey := ""
1266   }
1267   PriorDeadKey := ""
1268return
1269
1270neo_3:
1271   EbeneAktualisieren()
1272   if Ebene = 1
1273   {
1274      if (PriorDeadKey = "c1")          ; circumflex
1275         BSSendUnicodeChar(0x00B3)
1276      else if (PriorDeadKey = "c4")       ; toter -
1277         BSSendUnicodeChar(0x2083)
1278      else if (CompKey = "1")
1279         CompUnicodeChar(0x2153)          ; 1/3
1280      else if (CompKey = "2")
1281         CompUnicodeChar(0x2154)          ; 2/3
1282      else if (CompKey = "r_small")
1283         CompUnicodeChar(0x2172)          ; r�misch iii
1284      else if (CompKey = "r_capital")
1285         CompUnicodeChar(0x2162)          ; r�misch III
1286      else
1287       { 
1288         if GetKeyState("CapsLock","T")
1289         {
1290           if (IsModifierPressed())
1291           {
1292             send {blind}3
1293           }
1294           else
1295           {
1296               send 3
1297           }   
1298         }
1299         else {
1300            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1301            {           
1302              send {blind}3
1303            }
1304         }
1305       }
1306      if (PriorDeadKey = "comp")
1307         CompKey := "3"
1308      else
1309         CompKey := ""         
1310   }
1311   else if Ebene = 2
1312   {
1313      send �
1314      CompKey := ""
1315   }
1316   else if Ebene = 3
1317   {
1318      SendUnicodeChar(0x00B3) ; 3 Hochgestellte
1319      CompKey := ""
1320   }
1321   else if Ebene = 4
1322   { } ; leer
1323   else if Ebene = 5
1324   {
1325      SendUnicodeChar(0x2642) ; Piktogramm Mann
1326      CompKey := ""
1327   }
1328   else if Ebene = 6
1329   {
1330      SendUnicodeChar(0x2227) ; Logisches Und
1331      CompKey := ""
1332   }   
1333   PriorDeadKey := ""
1334return
1335
1336neo_4:
1337   EbeneAktualisieren()
1338   if Ebene = 1
1339   {
1340      if (PriorDeadKey = "c1")          ; circumflex
1341         BSSendUnicodeChar(0x2074)
1342      else if (PriorDeadKey = "c4")       ; toter -
1343         BSSendUnicodeChar(0x2084)         
1344      else if (CompKey = "r_small")
1345         CompUnicodeChar(0x2173)          ; r�misch iv
1346      else if (CompKey = "r_capital")
1347         CompUnicodeChar(0x2163)          ; r�misch IV
1348      else
1349       { 
1350         if GetKeyState("CapsLock","T")
1351         {
1352           if (IsModifierPressed())
1353           {
1354             send {blind}4
1355           }
1356           else
1357           {
1358              send 4
1359           }
1360               
1361         }
1362         else
1363         {
1364           if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1365           {
1366               send {blind}4
1367           }
1368         }
1369       }
1370      if (PriorDeadKey = "comp")
1371         CompKey := "4"
1372      else
1373         CompKey := ""         
1374    }
1375   else if Ebene = 2
1376   {
1377      send �
1378      CompKey := ""
1379   }
1380    else if Ebene = 3
1381   {
1382      send �
1383      CompKey := ""
1384   }
1385   else if Ebene = 4
1386   {
1387      Send {PgUp}    ; Prev
1388      CompKey := ""
1389   }
1390   else if Ebene = 5
1391   {
1392      SendUnicodeChar(0x2113) ; Script small L
1393      CompKey := ""
1394   }
1395   else if Ebene = 6
1396   {
1397      SendUnicodeChar(0x22A5) ; Senkrecht
1398      CompKey := ""
1399   }   
1400   PriorDeadKey := ""
1401return
1402
1403neo_5:
1404   EbeneAktualisieren()
1405   if Ebene = 1
1406   {
1407      if (PriorDeadKey = "c1")          ; circumflex
1408         BSSendUnicodeChar(0x2075)
1409      else if (PriorDeadKey = "c4")       ; toter -
1410         BSSendUnicodeChar(0x2085)
1411      else if (CompKey = "1")
1412         CompUnicodeChar(0x2155)          ; 1/5
1413      else if (CompKey = "2")
1414         CompUnicodeChar(0x2156)          ; 2/5
1415      else if (CompKey = "3")
1416         CompUnicodeChar(0x2157)          ; 3/5
1417      else if (CompKey = "4")
1418         CompUnicodeChar(0x2158)          ; 4/5
1419      else if (CompKey = "r_small")
1420         CompUnicodeChar(0x2174)          ; r�misch v
1421      else if (CompKey = "r_capital")
1422         CompUnicodeChar(0x2164)          ; r�misch V
1423      else
1424       { 
1425         if GetKeyState("CapsLock","T")
1426         {
1427           if (IsModifierPressed())
1428           {
1429             send {blind}5
1430           }
1431           else
1432           {
1433              send 5
1434           }
1435               
1436         }
1437         else {
1438            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1439            {
1440               send {blind}5
1441            }
1442         }
1443       }
1444      if (PriorDeadKey = "comp")
1445         CompKey := "5"
1446      else
1447         CompKey := ""         
1448    }
1449   else if Ebene = 2
1450   {
1451      send �
1452      CompKey := ""
1453   }
1454   else if Ebene = 3
1455   {
1456      send �
1457      CompKey := ""
1458   }
1459   else if Ebene = 4
1460   { } ; leer
1461   else if Ebene = 5
1462   {
1463      SendUnicodeChar(0x2020) ; Kreuz (Dagger)
1464      CompKey := ""
1465   }
1466   else if Ebene = 6
1467   {
1468      SendUnicodeChar(0x2221) ; Winkel
1469      CompKey := ""
1470   }   
1471   PriorDeadKey := ""
1472return
1473
1474neo_6:
1475   EbeneAktualisieren()
1476   if Ebene = 1
1477   {
1478      if (PriorDeadKey = "c1")          ; circumflex
1479         BSSendUnicodeChar(0x2076)
1480      else if (PriorDeadKey = "c4")       ; toter -
1481         BSSendUnicodeChar(0x2086)         
1482      else if (CompKey = "1")
1483         CompUnicodeChar(0x2159)          ; 1/6
1484      else if (CompKey = "5")
1485         CompUnicodeChar(0x215A)          ; 5/6
1486      else if (CompKey = "r_small")
1487         CompUnicodeChar(0x2175)          ; r�misch vi
1488      else if (CompKey = "r_capital")
1489         CompUnicodeChar(0x2165)          ; r�misch VI
1490      else
1491       { 
1492         if GetKeyState("CapsLock","T")
1493         {
1494           if (IsModifierPressed())
1495           {
1496             send {blind}6
1497           }
1498           else
1499           {
1500              send 6
1501           }
1502               
1503         }
1504         else {
1505            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1506            {
1507              send {blind}6
1508            }
1509         }
1510       }
1511      if (PriorDeadKey = "comp")
1512         CompKey := "6"
1513      else
1514         CompKey := ""         
1515    }
1516   else if Ebene = 2
1517   {
1518      send �
1519      CompKey := ""
1520   }
1521   else if Ebene = 3
1522   {
1523      send �
1524      CompKey := ""
1525   }
1526   else if Ebene = 4
1527   {
1528      send �
1529      CompKey := ""
1530   }
1531   else if Ebene = 5
1532   {  } ; leer
1533   else if Ebene = 6
1534   {
1535      SendUnicodeChar(0x2225) ; parallel
1536      CompKey := ""
1537   }
1538   PriorDeadKey := ""
1539return
1540
1541neo_7:
1542   EbeneAktualisieren()
1543   if Ebene = 1
1544   {
1545      if (PriorDeadKey = "c1")          ; circumflex
1546         BSSendUnicodeChar(0x2077)
1547      else if (PriorDeadKey = "c4")       ; toter -
1548         BSSendUnicodeChar(0x2087)
1549      else if (CompKey = "r_small")
1550         CompUnicodeChar(0x2176)          ; r�misch vii
1551      else if (CompKey = "r_capital")
1552         CompUnicodeChar(0x2166)          ; r�misch VII
1553      else
1554       { 
1555         if GetKeyState("CapsLock","T")
1556         {
1557           if (IsModifierPressed())
1558           {
1559             send {blind}7
1560           }
1561           else
1562           {
1563              send 7
1564           }
1565               
1566         }
1567         else {
1568            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1569            {
1570               send {blind}7
1571            }
1572         }
1573       }
1574      if (PriorDeadKey = "comp")
1575         CompKey := "7"
1576      else
1577         CompKey := ""         
1578    }
1579   else if Ebene = 2
1580   {
1581      send $
1582      CompKey := ""
1583   }
1584   else if Ebene = 3
1585   {
1586      send �
1587      CompKey := ""
1588   }
1589   else if Ebene = 4
1590   {
1591      send �
1592      CompKey := ""
1593   }
1594   else if Ebene = 5
1595   {
1596      SendUnicodeChar(0x03BA) ; greek small letter kappa
1597      CompKey := ""
1598   }
1599   else if Ebene = 6
1600   {
1601      SendUnicodeChar(0x2209) ; nicht Element von
1602      CompKey := ""
1603   }
1604   PriorDeadKey := ""
1605return
1606
1607neo_8:
1608   EbeneAktualisieren()
1609   if Ebene = 1
1610   {
1611      if (PriorDeadKey = "c1")          ; circumflex
1612         BSSendUnicodeChar(0x2078)
1613      else if (PriorDeadKey = "c4")       ; toter -
1614         BSSendUnicodeChar(0x2088)
1615      else if (CompKey = "1")
1616         CompUnicodeChar(0x215B)          ; 1/8
1617      else if (CompKey = "3")
1618         CompUnicodeChar(0x215C)          ; 3/8
1619      else if (CompKey = "5")
1620         CompUnicodeChar(0x215D)          ; 5/8
1621      else if (CompKey = "7")
1622         CompUnicodeChar(0x215E)          ; 7/8
1623      else if (CompKey = "r_small")
1624         CompUnicodeChar(0x2177)          ; r�misch viii
1625      else if (CompKey = "r_capital")
1626         CompUnicodeChar(0x2167)          ; r�misch VIII
1627      else
1628       { 
1629         if GetKeyState("CapsLock","T")
1630         {
1631           if (IsModifierPressed())
1632           {
1633             send {blind}8
1634           }
1635           else
1636           {
1637              send 8
1638           }
1639               
1640         }
1641         else {
1642            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1643            {
1644              send {blind}8
1645            }   
1646         }
1647       }
1648      if (PriorDeadKey = "comp")
1649         CompKey := "8"
1650      else
1651         CompKey := ""         
1652    }
1653   else if Ebene = 2
1654   {
1655      send �
1656      CompKey := ""
1657   }
1658   else if Ebene = 3
1659   {
1660      send �
1661      CompKey := ""
1662   }
1663   else if Ebene = 4
1664   {
1665      Send /
1666      CompKey := ""
1667   }
1668   else if Ebene = 5
1669   {
1670      SendUnicodeChar(0x27E8) ;bra (�ffnende spitze klammer)
1671   }
1672   else if Ebene = 6
1673   {
1674      SendUnicodeChar(0x2204) ; es existiert nicht
1675      CompKey := ""
1676   }
1677   PriorDeadKey := ""
1678return
1679
1680neo_9:
1681   EbeneAktualisieren()
1682   if Ebene = 1
1683   {
1684      if (PriorDeadKey = "c1")          ; circumflex
1685         BSSendUnicodeChar(0x2079)
1686      else if (PriorDeadKey = "c4")       ; toter -
1687         BSSendUnicodeChar(0x2089)
1688      else if (CompKey = "r_small")
1689         CompUnicodeChar(0x2178)          ; r�misch ix
1690      else if (CompKey = "r_capital")
1691         CompUnicodeChar(0x2168)          ; r�misch IX
1692      else
1693       { 
1694         if GetKeyState("CapsLock","T")
1695         {
1696           if (IsModifierPressed())
1697           {
1698             send {blind}9
1699           }
1700           else
1701           {
1702              send 9
1703           }
1704               
1705         }
1706         else {
1707            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1708            {
1709              send {blind}9
1710            }
1711         }
1712       }
1713      if (PriorDeadKey = "comp")
1714         CompKey := "9"
1715      else
1716         CompKey := ""         
1717    }
1718   else if Ebene = 2
1719   {
1720      send �
1721      CompKey := ""
1722   }
1723   else if Ebene = 3
1724   {
1725      send �
1726      CompKey := ""
1727   }
1728   else if Ebene = 4
1729   {
1730      Send *
1731      CompKey := ""
1732   }
1733   else if Ebene = 5
1734   {
1735      SendUnicodeChar(0x27E9) ;ket (schlie�ende spitze klammer)
1736   }
1737   else if Ebene = 6
1738   {
1739      SendUnicodeChar(0x2226) ; nicht parallel
1740      CompKey := ""
1741   }
1742   PriorDeadKey := ""
1743return
1744
1745neo_0:
1746   EbeneAktualisieren()
1747   if Ebene = 1
1748   {
1749      if (PriorDeadKey = "c1")          ; circumflex
1750         BSSendUnicodeChar(0x2070)
1751      else if (PriorDeadKey = "c4")       ; toter -
1752         BSSendUnicodeChar(0x2080)         
1753      else if (CompKey = "r_small_1")
1754         Comp3UnicodeChar(0x2179)          ; r�misch x
1755      else if (CompKey = "r_capital_1")
1756         Comp3UnicodeChar(0x2169)          ; r�misch X
1757      else
1758       { 
1759         if GetKeyState("CapsLock","T")
1760         {
1761           if (IsModifierPressed())
1762           {
1763             send {blind}0
1764           }
1765           else
1766           {
1767              send 0
1768           }
1769               
1770         }
1771         else {
1772            if ( not(lernModus) or (lernModus_std_ZahlenReihe) )
1773            {
1774               send {blind}0
1775            }
1776         }
1777       }
1778      if (PriorDeadKey = "comp")
1779         CompKey := "0"
1780      else
1781         CompKey := ""         
1782    }
1783   else if Ebene = 2
1784   {
1785      send �
1786      CompKey := ""
1787   }
1788   else if Ebene = 3
1789   {
1790      send �
1791      CompKey := ""
1792   }
1793   else if Ebene = 4
1794   {
1795      Send -
1796      CompKey := ""
1797   }
1798   else if Ebene = 5
1799   {  } ; leer
1800   else if Ebene = 6
1801   {
1802      SendUnicodeChar(0x2205) ; leere Menge
1803      CompKey := ""
1804   }
1805   PriorDeadKey := ""
1806return
1807
1808neo_strich:
1809   EbeneAktualisieren()
1810   if Ebene = 1
1811        { 
1812         if GetKeyState("CapsLock","T")
1813         {
1814           if (IsModifierPressed())
1815           {
1816             send {blind}-
1817           }
1818           else
1819           {
1820              send -
1821           }
1822               
1823         }
1824         else {
1825           send {blind}-   ;Bindestrich
1826         }
1827       }
1828   else if Ebene = 2
1829      SendUnicodeChar(0x2013) ; Gedankenstrich
1830   else if Ebene = 3
1831      SendUnicodeChar(0x2014) ; Englische Gedankenstrich
1832   else if Ebene = 4
1833     { } ; leer ...  SendUnicodeChar(0x254C)
1834   else if Ebene = 5
1835      SendUnicodeChar(0x2011) ; gesch�tzter Bindestrich
1836   else if Ebene = 6
1837      SendUnicodeChar(0x00AD) ; weicher Trennstrich
1838   PriorDeadKey := ""   CompKey := ""
1839return
1840
1841neo_tot2:
1842   EbeneAktualisieren()
1843   if Ebene = 1
1844   {
1845      send {�}{space} ; akut, tot
1846      PriorDeadKey := "a1"
1847   }
1848   else if Ebene = 2
1849   {
1850      send ``{space}
1851      PriorDeadKey := "a2"
1852   }
1853   else if Ebene = 3
1854   {
1855      send � ; cedilla
1856      PriorDeadKey := "a3"
1857   }
1858   else if Ebene = 4
1859   {
1860      SendUnicodeChar(0x02D9) ; punkt oben dr�ber
1861      PriorDeadKey := "a5"
1862   }
1863   else if Ebene = 5
1864   {
1865      SendUnicodeChar(0x02DB) ; ogonek
1866      PriorDeadKey := "a4"
1867   }
1868   else if Ebene = 6
1869   {
1870      SendUnicodeChar(0x02DA)  ; ring obendrauf
1871      PriorDeadKey := "a6"
1872   }
1873return
1874
1875
1876/*
1877   ------------------------------------------------------
1878   Reihe 2
1879   ------------------------------------------------------
1880*/
1881
1882neo_x:
1883   EbeneAktualisieren()
1884   if Ebene = 1
1885      sendinput {blind}x
1886   else if Ebene = 2
1887      sendinput {blind}X
1888   else if Ebene = 3
1889      SendUnicodeChar(0x2026) ;Ellipse
1890   else if Ebene = 5
1891      SendUnicodeChar(0x03BE) ;xi
1892   else if Ebene = 6
1893      SendUnicodeChar(0x039E)  ; Xi
1894   PriorDeadKey := ""   CompKey := ""
1895return
1896
1897
1898neo_v:
1899   EbeneAktualisieren()
1900   if Ebene = 1
1901   {
1902      if (PriorDeadKey = "c6")      ; punkt darunter
1903         BSSendUnicodeChar(0x1E7F)
1904      else
1905         sendinput {blind}v
1906   }
1907   else if Ebene = 2
1908   {
1909      if (PriorDeadKey = "c6")      ; punkt darunter
1910         BSSendUnicodeChar(0x1E7E)
1911      else
1912         sendinput {blind}V
1913   }
1914   else if Ebene = 3
1915      send _
1916   else if Ebene = 4
1917      if ( not(lernModus) or (lernModus_neo_Backspace) )
1918      {
1919         Send {Backspace}
1920      }
1921      else
1922      {} ; leer
1923   else if Ebene = 6
1924      SendUnicodeChar(0x2259) ; estimates
1925   PriorDeadKey := ""   CompKey := ""
1926return
1927
1928
1929
1930neo_l:
1931   EbeneAktualisieren()
1932   if Ebene = 1
1933   {
1934      if (PriorDeadKey = "t5")       ; Schr�gstrich
1935         BSSendUnicodeChar(0x0142)
1936      else if (PriorDeadKey = "a1")      ; akut
1937         BSSendUnicodeChar(0x013A)
1938      else if (PriorDeadKey = "c2")     ; caron
1939         BSSendUnicodeChar(0x013E)
1940      else if (PriorDeadKey = "a3")    ; cedilla
1941         BSSendUnicodeChar(0x013C)
1942      else if (PriorDeadKey = "c5")  ; Mittenpunkt
1943         BSSendUnicodeChar(0x0140)
1944      else if (PriorDeadKey = "c6") ; punkt darunter
1945         BSSendUnicodeChar(0x1E37)
1946      else
1947         sendinput {blind}l
1948      if (PriorDeadKey = "comp")            ; compose
1949         CompKey := "l_small"
1950      else
1951         CompKey := ""
1952   }
1953   else if Ebene = 2
1954   {
1955      if (PriorDeadKey = "a1")           ; akut
1956         BSSendUnicodeChar(0x0139)
1957      else if (PriorDeadKey = "c2")     ; caron
1958         BSSendUnicodeChar(0x013D)
1959      else if (PriorDeadKey = "a3")    ; cedilla
1960         BSSendUnicodeChar(0x013B)
1961      else if (PriorDeadKey = "t5")  ; Schr�gstrich
1962         BSSendUnicodeChar(0x0141)
1963      else if (PriorDeadKey = "c5")  ; Mittenpunkt
1964         BSSendUnicodeChar(0x013F)
1965      else if (PriorDeadKey = "c6") ; punkt darunter
1966         BSSendUnicodeChar(0x1E36)
1967      else
1968         sendinput {blind}L
1969      if (PriorDeadKey = "comp")            ; compose
1970         CompKey := "l_capital"
1971      else CompKey := ""
1972   }     
1973   else if Ebene = 3
1974   {
1975      send [
1976      CompKey := ""
1977   }
1978   else if Ebene = 4
1979   {
1980      Sendinput {Blind}{Up}
1981      CompKey := ""
1982   }
1983   else if Ebene = 5
1984   {
1985      SendUnicodeChar(0x03BB) ; lambda
1986      CompKey := ""
1987   }
1988   else if Ebene = 6
1989   {
1990      SendUnicodeChar(0x039B) ; Lambda
1991      CompKey := ""
1992   }
1993   PriorDeadKey := ""
1994return
1995
1996
1997neo_c:
1998   EbeneAktualisieren()
1999   if Ebene = 1
2000   {
2001      if (PriorDeadKey = "c1")           ; circumflex
2002         BSSendUnicodeChar(0x0109)
2003      else if (PriorDeadKey = "c2")     ; caron
2004         BSSendUnicodeChar(0x010D)
2005      else if (PriorDeadKey = "a1")      ; akut
2006         BSSendUnicodeChar(0x0107)
2007      else if (PriorDeadKey = "a3")    ; cedilla
2008         BSSendUnicodeChar(0x00E7)
2009      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2010         BSSendUnicodeChar(0x010B)
2011      else if ( (CompKey = "o_small") or (CompKey = "o_capital") )
2012         Send {bs}�
2013      else
2014      {         
2015         sendinput {blind}c     
2016      }
2017      if (PriorDeadKey = "comp")
2018         CompKey := "c_small"
2019      else
2020         CompKey := ""
2021   }
2022   else if Ebene = 2
2023   {
2024      if (PriorDeadKey = "c1")          ; circumflex
2025         BSSendUnicodeChar(0x0108)
2026      else if (PriorDeadKey = "c2")    ; caron
2027         BSSendUnicodeChar(0x010C)
2028      else if (PriorDeadKey = "a1")     ; akut
2029         BSSendUnicodeChar(0x0106)
2030      else if (PriorDeadKey = "a3")   ; cedilla
2031         BSSendUnicodeChar(0x00E6)
2032      else if (PriorDeadKey = "a5") ; punkt dar�ber
2033         BSSendUnicodeChar(0x010A)
2034      else if ( (CompKey = "o_small") or (CompKey = "o_capital") )
2035         Send {bs}�         
2036      else
2037         sendinput {blind}C
2038      if (PriorDeadKey = "comp")
2039         CompKey = "c_capital"
2040      else
2041         CompKey := ""
2042   }
2043   else if Ebene = 3
2044   {
2045      send ]
2046      CompKey := ""
2047   }
2048   else if Ebene = 4
2049   {
2050      if ( not(lernModus) or (lernModus_neo_Entf) )
2051      {
2052        Send {Del}
2053        CompKey := ""
2054      }
2055      else
2056      {} ; leer
2057   }
2058   else if Ebene = 5
2059   {
2060      SendUnicodeChar(0x03C7) ;chi
2061      CompKey := ""
2062   }
2063   else if Ebene = 6
2064   {
2065      SendUnicodeChar(0x2102)  ; C (Komplexe Zahlen)
2066      CompKey := ""
2067   }
2068   PriorDeadKey := ""
2069return
2070
2071neo_w:
2072   EbeneAktualisieren()
2073   if Ebene = 1
2074   {
2075      if (PriorDeadKey = "c1")           ; circumflex
2076         BSSendUnicodeChar(0x0175)
2077      else
2078         sendinput {blind}w
2079   }
2080   else if Ebene = 2
2081   {
2082      if (PriorDeadKey = "c1")           ; circumflex
2083         BSSendUnicodeChar(0x0174)
2084      else
2085         sendinput {blind}W
2086   }
2087   else if Ebene = 3
2088      send {^}{space} ; untot
2089   else if Ebene = 4
2090      Send {Insert}
2091   else if Ebene = 5
2092      SendUnicodeChar(0x03C9) ; omega
2093   else if Ebene = 6
2094      SendUnicodeChar(0x03A9) ; Omega
2095   PriorDeadKey := ""   CompKey := ""
2096return
2097
2098neo_k:
2099   EbeneAktualisieren()
2100   if Ebene = 1
2101   {
2102      if (PriorDeadKey = "a3")         ; cedilla
2103         BSSendUnicodeChar(0x0137)
2104      else if (PriorDeadKey = "c6") ; punkt darunter
2105         BSSendUnicodeChar(0x1E33)
2106      else
2107         sendinput {blind}k
2108   }
2109   else if Ebene = 2
2110   {
2111      if (PriorDeadKey = "a3")         ; cedilla
2112         BSSendUnicodeChar(0x0136)
2113      else if (PriorDeadKey = "c6") ; punkt darunter
2114         BSSendUnicodeChar(0x1E32)
2115      else
2116         sendinput {blind}K
2117   }
2118   else if Ebene = 3
2119      sendraw !
2120   else if Ebene = 4
2121      Send �
2122   else if Ebene = 5
2123      SendUnicodeChar(0x03F0) ;kappa symbol (varkappa)
2124   else if Ebene = 6
2125      SendUnicodeChar(0x221A) ; Wurzel
2126   PriorDeadKey := ""   CompKey := ""
2127return
2128
2129neo_h:
2130   EbeneAktualisieren()
2131   if Ebene = 1
2132   {
2133      if (PriorDeadKey = "c1")           ; circumflex
2134         BSSendUnicodeChar(0x0125)
2135      else if (PriorDeadKey = "c4")   ; Querstrich
2136         BSSendUnicodeChar(0x0127)
2137      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2138         BSSendUnicodeChar(0x1E23)
2139      else if (PriorDeadKey = "c6") ; punkt darunter
2140         BSSendUnicodeChar(0x1E25)
2141      else sendinput {blind}h
2142   }
2143   else if Ebene = 2
2144   {
2145      if (PriorDeadKey = "c1")           ; circumflex
2146         BSSendUnicodeChar(0x0124)
2147      else if (PriorDeadKey = "c4")   ; Querstrich
2148         BSSendUnicodeChar(0x0126)
2149      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2150         BSSendUnicodeChar(0x1E22)
2151      else if (PriorDeadKey = "c6") ; punkt darunter
2152         BSSendUnicodeChar(0x1E24)
2153      else sendinput {blind}H
2154   }
2155   else if Ebene = 3
2156   {
2157      if (PriorDeadKey = "c4")    ; Querstrich
2158         BSSendUnicodeChar(0x2264) ; kleiner gleich
2159      else
2160         send {blind}<
2161   }
2162   else if Ebene = 4
2163   {
2164      if (PriorDeadKey = "c1")            ; circumflex
2165         BSSendUnicodeChar(0x2077)
2166      else if (PriorDeadKey = "c4")       ; toter -
2167         BSSendUnicodeChar(0x2087)
2168      else
2169         Send 7
2170   }
2171   else if Ebene = 5
2172      SendUnicodeChar(0x03C8) ;psi
2173   else if Ebene = 6
2174      SendUnicodeChar(0x03A8)  ; Psi
2175   PriorDeadKey := ""   CompKey := ""
2176return
2177
2178neo_g:
2179   EbeneAktualisieren()
2180   if Ebene = 1
2181   {
2182      if (PriorDeadKey = "c1")          ; circumflex
2183         BSSendUnicodeChar(0x011D)
2184      else if (PriorDeadKey = "c3")   ; brevis
2185         BSSendUnicodeChar(0x011F)
2186      else if (PriorDeadKey = "a3")   ; cedilla
2187         BSSendUnicodeChar(0x0123)
2188      else if (PriorDeadKey = "a5") ; punkt dar�ber
2189         BSSendUnicodeChar(0x0121)
2190      else sendinput {blind}g
2191   }
2192   else if Ebene = 2
2193   {
2194      if (PriorDeadKey = "c1")           ; circumflex
2195         BSSendUnicodeChar(0x011C)
2196      else if (PriorDeadKey = "c3")    ; brevis
2197         BSSendUnicodeChar(0x011E)
2198      else if (PriorDeadKey = "a3")    ; cedilla
2199         BSSendUnicodeChar(0x0122)
2200      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2201         BSSendUnicodeChar(0x0120)
2202      else sendinput {blind}G
2203   }
2204   else if Ebene = 3
2205   {
2206      if (PriorDeadKey = "c4")    ; Querstrich
2207         SendUnicodeChar(0x2265) ; gr��er gleich
2208      else
2209         send >
2210   }
2211   else if Ebene = 4
2212   {
2213      if (PriorDeadKey = "c1")            ; circumflex
2214         BSSendUnicodeChar(0x2078)
2215      else if (PriorDeadKey = "c4")       ; toter -
2216         BSSendUnicodeChar(0x2088)
2217      else
2218         Send 8
2219   }
2220   else if Ebene = 5
2221      SendUnicodeChar(0x03B3) ;gamma
2222   else if Ebene = 6
2223      SendUnicodeChar(0x0393)  ; Gamma
2224   PriorDeadKey := ""   CompKey := ""
2225return
2226
2227neo_f:
2228   EbeneAktualisieren()
2229   if Ebene = 1
2230   {
2231      if (PriorDeadKey = "t5")      ; durchgestrichen
2232         BSSendUnicodeChar(0x0192)
2233      else if (PriorDeadKey = "a5") ; punkt dar�ber
2234         BSSendUnicodeChar(0x1E1F)
2235      else sendinput {blind}f
2236   }
2237   else if Ebene = 2
2238   {
2239      if (PriorDeadKey = "t5")       ; durchgestrichen
2240         BSSendUnicodeChar(0x0191)
2241      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2242         BSSendUnicodeChar(0x1E1E)
2243      else sendinput {blind}F
2244   }
2245   else if Ebene = 3
2246   {
2247      if (PriorDeadKey = "c1")            ; circumflex
2248         BSSendUnicodeChar(0x2259)   ; entspricht
2249      else if (PriorDeadKey = "t1")       ; tilde
2250         BSSendUnicodeChar(0x2245)   ; ungef�hr gleich
2251      else if (PriorDeadKey = "t5")       ; Schr�gstrich
2252         BSSendUnicodeChar(0x2260)   ; ungleich
2253      else if (PriorDeadKey = "c4")       ; Querstrich
2254         BSSendUnicodeChar(0x2261)   ; identisch
2255      else if (PriorDeadKey = "c2")       ; caron
2256         BSSendUnicodeChar(0x225A)   ; EQUIANGULAR TO
2257      else if (PriorDeadKey = "a6")       ; ring dr�ber
2258         BSSendUnicodeChar(0x2257)   ; ring equal to
2259      else
2260         send `=
2261   }
2262   else if Ebene = 4
2263   {
2264      if (PriorDeadKey = "c1")            ; circumflex
2265         BSSendUnicodeChar(0x2079)
2266      else if (PriorDeadKey = "c4")       ; toter -
2267         BSSendUnicodeChar(0x2089)
2268      else
2269         Send 9
2270   }
2271   else if Ebene = 5
2272      SendUnicodeChar(0x03C6) ; phi
2273   else if Ebene = 6
2274      SendUnicodeChar(0x03A6)  ; Phi
2275   PriorDeadKey := ""   CompKey := ""
2276return
2277
2278neo_q:
2279   EbeneAktualisieren()
2280   if Ebene = 1
2281      sendinput {blind}q
2282   else if Ebene = 2
2283      sendinput {blind}Q
2284   else if Ebene = 3
2285      send {&}
2286   else if Ebene = 4
2287   {
2288      if (PriorDeadKey = "c1")            ; circumflex
2289         BSSendUnicodeChar(0x207A)
2290      else if (PriorDeadKey = "c4")       ; toter -
2291         BSSendUnicodeChar(0x208A)
2292      else
2293         Send {+}
2294   }
2295   else if Ebene = 5
2296      SendUnicodeChar(0x03D5) ; phi symbol (varphi)
2297   else if Ebene = 6
2298      SendUnicodeChar(0x211A) ; Q (rationale Zahlen)
2299   PriorDeadKey := ""   CompKey := ""
2300return
2301
2302neo_sz:
2303   EbeneAktualisieren()
2304   if Ebene = 1
2305      if GetKeyState("CapsLock","T")
2306      {
2307         SendUnicodeChar(0x1E9E) ; verssal-�
2308      }
2309      else
2310      {
2311         if (LangSTastatur = 1)
2312         {
2313            sendinput {blind}s
2314         }
2315         else
2316         {
2317            send �
2318         }
2319      }
2320   else if Ebene = 2
2321      if GetKeyState("CapsLock","T")
2322      {
2323         if (LangSTastatur = 1)
2324         {
2325            sendinput {blind}s
2326         }
2327         else
2328         {
2329            send �
2330         }
2331      }
2332      else
2333      {
2334         SendUnicodeChar(0x1E9E) ; versal-�
2335      }
2336   else if Ebene = 3
2337   {
2338      if (LangSTastatur = 1)
2339         send �
2340      else
2341         SendUnicodeChar(0x017F) ; langes s
2342   }
2343   else if Ebene = 5
2344      SendUnicodeChar(0x03C2) ; varsigma
2345   else if Ebene = 6
2346      SendUnicodeChar(0x2218) ; Verkn�pfungsoperator
2347   PriorDeadKey := ""   CompKey := ""
2348return
2349
2350
2351neo_tot3:
2352   EbeneAktualisieren()
2353   if Ebene = 1
2354   {
2355      SendUnicodeChar(0x02DC)    ; tilde, tot
2356      PriorDeadKey := "t1"
2357   }
2358   else if Ebene = 2
2359   {
2360      SendUnicodeChar(0x00AF)  ; macron, tot
2361      PriorDeadKey := "t2"
2362   }
2363   else if Ebene = 3
2364   {
2365      SendUnicodeChar(0x00A8)   ; Diaerese
2366      PriorDeadKey := "t3"
2367   }
2368   else if Ebene = 4
2369   {
2370      SendUnicodeChar(0x002F)  ; Schr�gstrich, tot
2371      PriorDeadKey := "t5"
2372   }
2373   else if Ebene = 5
2374   {
2375      send "        ;doppelakut
2376      PriorDeadKey := "t4"
2377   }
2378   else if Ebene = 6
2379   {
2380      SendUnicodeChar(0x02CF)  ; komma drunter, tot
2381      PriorDeadKey := "t6"
2382   }
2383return
2384
2385
2386/*
2387   ------------------------------------------------------
2388   Reihe 3
2389   ------------------------------------------------------
2390*/
2391
2392neo_u:
2393   EbeneAktualisieren()
2394   if Ebene = 1
2395   {
2396      if (PriorDeadKey = "c1")       ; circumflex
2397         BSSendUnicodeChar(0x00FB)
2398      else if (PriorDeadKey = "a1")  ; akut
2399         BSSendUnicodeChar(0x00FA)
2400      else if (PriorDeadKey = "a2")  ; grave
2401         BSSendUnicodeChar(0x00F9)
2402      else if (PriorDeadKey = "t3")  ; Diaerese
2403         Send, {bs}�
2404      else if (PriorDeadKey = "t4")  ; doppelakut
2405         BSSendUnicodeChar(0x0171)
2406      else if (PriorDeadKey = "c3")  ; brevis
2407         BSSendUnicodeChar(0x016D)
2408      else if (PriorDeadKey = "t2")  ; macron
2409         BSSendUnicodeChar(0x016B)
2410      else if (PriorDeadKey = "a4")  ; ogonek
2411         BSSendUnicodeChar(0x0173)
2412      else if (PriorDeadKey = "a6")  ; Ring
2413         BSSendUnicodeChar(0x016F)
2414      else if (PriorDeadKey = "t1")  ; tilde
2415         BSSendUnicodeChar(0x0169)
2416      else if (PriorDeadKey = "c2")  ; caron
2417         BSSendUnicodeChar(0x01D4)
2418      else
2419         sendinput {blind}u
2420   }
2421   else if Ebene = 2
2422   {
2423      if (PriorDeadKey = "c1")        ; circumflex
2424         BSSendUnicodeChar(0x00DB)
2425      else if (PriorDeadKey = "a1")   ; akut
2426         BSSendUnicodeChar(0x00DA)
2427      else if (PriorDeadKey = "a2")   ; grave
2428         BSSendUnicodeChar(0x00D9)
2429      else if (PriorDeadKey = "t3")   ; Diaerese
2430         Send, {bs}�
2431      else if (PriorDeadKey = "a6")   ; Ring
2432         BSSendUnicodeChar(0x016E)
2433      else if (PriorDeadKey = "c3")   ; brevis
2434         BSSendUnicodeChar(0x016C)
2435      else if (PriorDeadKey = "t4")   ; doppelakut
2436         BSSendUnicodeChar(0x0170)
2437      else if (PriorDeadKey = "c2")   ; caron
2438         BSSendUnicodeChar(0x01D3)
2439      else if (PriorDeadKey = "t2")   ; macron
2440         BSSendUnicodeChar(0x016A)
2441      else if (PriorDeadKey = "a4")   ; ogonek
2442         BSSendUnicodeChar(0x0172)
2443      else if (PriorDeadKey = "t1")   ; tilde
2444         BSSendUnicodeChar(0x0168)
2445      else
2446         sendinput {blind}U
2447   }
2448   else if Ebene = 3
2449      send \
2450   else if Ebene = 4
2451      Send {blind}{Home}
2452   else if Ebene = 5   
2453   {  } ; leer
2454   else if Ebene = 6
2455      SendUnicodeChar(0x222E) ; contour integral
2456   PriorDeadKey := ""   CompKey := ""
2457return
2458
2459neo_i:
2460   EbeneAktualisieren()
2461   if Ebene = 1
2462   {
2463      if (PriorDeadKey = "c1")        ; circumflex
2464         BSSendUnicodeChar(0x00EE)
2465      else if (PriorDeadKey = "a1")   ; akut
2466         BSSendUnicodeChar(0x00ED)
2467      else if (PriorDeadKey = "a2")   ; grave
2468         BSSendUnicodeChar(0x00EC)
2469      else if (PriorDeadKey = "t3")   ; Diaerese
2470         Send, {bs}�
2471      else if (PriorDeadKey = "t2")   ; macron
2472         BSSendUnicodeChar(0x012B)
2473      else if (PriorDeadKey = "c3")   ; brevis
2474         BSSendUnicodeChar(0x012D)
2475      else if (PriorDeadKey = "a4")   ; ogonek
2476         BSSendUnicodeChar(0x012F)
2477      else if (PriorDeadKey = "t1")   ; tilde
2478         BSSendUnicodeChar(0x0129)
2479      else if (PriorDeadKey = "a5")   ; (ohne) punkt dar�ber
2480         BSSendUnicodeChar(0x0131)
2481      else if (PriorDeadKey = "c2")   ; caron
2482         BSSendUnicodeChar(0x01D0)
2483      else
2484         sendinput {blind}i
2485      if (PriorDeadKey = "comp")      ; compose
2486         CompKey := "i_small"
2487      else
2488         CompKey := ""
2489   }
2490   else if Ebene = 2
2491   {   
2492      if (PriorDeadKey = "c1")        ; circumflex
2493         BSSendUnicodeChar(0x00CE)
2494      else if (PriorDeadKey = "a1")   ; akut
2495         BSSendUnicodeChar(0x00CD)
2496      else if (PriorDeadKey = "a2")   ; grave
2497         BSSendUnicodeChar(0x00CC)
2498      else if (PriorDeadKey = "t3")   ; Diaerese
2499         Send, {bs}�
2500      else if (PriorDeadKey = "t2")   ; macron
2501         BSSendUnicodeChar(0x012A)
2502      else if (PriorDeadKey = "c3")   ; brevis
2503         BSSendUnicodeChar(0x012C)
2504      else if (PriorDeadKey = "a4")   ; ogonek
2505         BSSendUnicodeChar(0x012E)
2506      else if (PriorDeadKey = "t1")   ; tilde
2507         BSSendUnicodeChar(0x0128)
2508      else if (PriorDeadKey = "a5")   ; punkt dar�ber
2509         BSSendUnicodeChar(0x0130)
2510      else if (PriorDeadKey = "c2")   ; caron
2511         BSSendUnicodeChar(0x01CF)
2512      else
2513         sendinput {blind}I
2514      if (PriorDeadKey = "comp")      ; compose
2515         CompKey := "i_capital"
2516      else
2517         CompKey := ""
2518   }
2519   else if Ebene = 3
2520   {
2521      send `/
2522      CompKey := ""
2523   }
2524   else if Ebene = 4
2525   {
2526      Sendinput {Blind}{Left}
2527      CompKey := ""
2528   }
2529   else if Ebene = 5   
2530   {
2531      SendUnicodeChar(0x03B9) ; iota
2532      CompKey := ""
2533   }
2534   else if Ebene = 6
2535   {
2536      SendUnicodeChar(0x222B) ; integral
2537      CompKey := ""
2538   }
2539      PriorDeadKey := ""
2540return
2541
2542neo_a:
2543   EbeneAktualisieren()
2544   if Ebene = 1
2545   {
2546      if (PriorDeadKey = "c1")        ; circumflex
2547         BSSendUnicodeChar(0x00E2)
2548      else if (PriorDeadKey = "a1")   ; akut
2549         BSSendUnicodeChar(0x00E1)
2550      else if (PriorDeadKey = "a2")   ; grave
2551         BSSendUnicodeChar(0x00E0)
2552      else if (PriorDeadKey = "t3")   ; Diaerese
2553         send {bs}�
2554      else if (PriorDeadKey = "a6")   ; Ring
2555         Send {bs}�
2556      else if (PriorDeadKey = "t1")   ; tilde
2557         BSSendUnicodeChar(0x00E3)
2558      else if (PriorDeadKey = "a4")   ; ogonek
2559         BSSendUnicodeChar(0x0105)
2560      else if (PriorDeadKey = "t2")   ; macron
2561         BSSendUnicodeChar(0x0101)
2562      else if (PriorDeadKey = "c3")   ; brevis
2563         BSSendUnicodeChar(0x0103)
2564      else if (PriorDeadKey = "c2")   ; caron
2565         BSSendUnicodeChar(0x01CE)
2566      else
2567         sendinput {blind}a
2568      if (PriorDeadKey = "comp")      ; compose
2569         CompKey := "a_small"
2570      else
2571         CompKey := ""
2572   }
2573   else if Ebene = 2
2574   {
2575      if (PriorDeadKey = "c1")        ; circumflex
2576         BSSendUnicodeChar(0x00C2)
2577      else if (PriorDeadKey = "a1")   ; akut
2578         BSSendUnicodeChar(0x00C1)
2579      else if (PriorDeadKey = "a2")   ; grave
2580         BSSendUnicodeChar(0x00C0)
2581      else if (PriorDeadKey = "t3")   ; Diaerese
2582         send {bs}�
2583      else if (PriorDeadKey = "t1")   ; tilde
2584         BSSendUnicodeChar(0x00C3)
2585      else if (PriorDeadKey = "a6")   ; Ring
2586         Send {bs}�
2587      else if (PriorDeadKey = "t2")   ; macron
2588         BSSendUnicodeChar(0x0100)
2589      else if (PriorDeadKey = "c3")   ; brevis
2590         BSSendUnicodeChar(0x0102)
2591      else if (PriorDeadKey = "a4")   ; ogonek
2592         BSSendUnicodeChar(0x0104)
2593      else if (PriorDeadKey = "c2")   ; caron
2594         BSSendUnicodeChar(0x01CD)
2595      else
2596         sendinput {blind}A
2597      if (PriorDeadKey = "comp")      ; compose
2598         CompKey := "a_capital"
2599      else
2600         CompKey := ""
2601   }
2602   else if Ebene = 3
2603   {
2604      sendraw {
2605      CompKey := ""
2606   }
2607   else if Ebene = 4
2608   {
2609      Sendinput {Blind}{Down}
2610      CompKey := ""
2611   }
2612   else if Ebene = 5
2613   {
2614      SendUnicodeChar(0x03B1) ;alpha
2615      CompKey := ""
2616   }
2617   else if Ebene = 6
2618   {
2619      SendUnicodeChar(0x2200) ;fuer alle   
2620      CompKey := ""
2621   }
2622   PriorDeadKey := ""
2623return
2624
2625neo_e:
2626   EbeneAktualisieren()
2627   if Ebene = 1
2628   {
2629      if (PriorDeadKey = "c1")        ; circumflex
2630         BSSendUnicodeChar(0x00EA)
2631      else if (PriorDeadKey = "a1")   ; akut
2632         BSSendUnicodeChar(0x00E9)
2633      else if (PriorDeadKey = "a2")   ; grave
2634         BSSendUnicodeChar(0x00E8)
2635      else if (PriorDeadKey = "t3")   ; Diaerese
2636         Send, {bs}�
2637      else if (PriorDeadKey = "a4")   ; ogonek
2638         BSSendUnicodeChar(0x0119)
2639      else if (PriorDeadKey = "t2")   ; macron
2640         BSSendUnicodeChar(0x0113)
2641      else if (PriorDeadKey = "c3")   ; brevis
2642         BSSendUnicodeChar(0x0115)
2643      else if (PriorDeadKey = "c2")   ; caron
2644         BSSendUnicodeChar(0x011B)
2645      else if (PriorDeadKey = "a5")   ; punkt dar�ber
2646         BSSendUnicodeChar(0x0117)
2647      else if (CompKey = "a_small")   ; compose
2648      {
2649         Send {bs}�
2650         CompKey := ""
2651      }
2652      else if (CompKey = "o_small")   ; compose
2653      {
2654         Send {bs}�
2655         CompKey := ""
2656      }     
2657      else
2658         sendinput {blind}e
2659   }
2660   else if Ebene = 2
2661   {
2662      if (PriorDeadKey = "c1")        ; circumflex
2663         BSSendUnicodeChar(0x00CA)
2664      else if (PriorDeadKey = "a1")   ; akut
2665         BSSendUnicodeChar(0x00C9)
2666      else if (PriorDeadKey = "a2")   ; grave
2667         BSSendUnicodeChar(0x00C8)
2668      else if (PriorDeadKey = "t3")   ; Diaerese
2669         Send, {bs}�
2670      else if (PriorDeadKey = "c2")   ; caron
2671         BSSendUnicodeChar(0x011A)
2672      else if (PriorDeadKey = "t2")   ; macron
2673         BSSendUnicodeChar(0x0112)
2674      else if (PriorDeadKey = "c3")   ; brevis
2675         BSSendUnicodeChar(0x0114)
2676      else if (PriorDeadKey = "a4")   ; ogonek
2677         BSSendUnicodeChar(0x0118)
2678      else if (PriorDeadKey = "a5")   ; punkt dar�ber
2679         BSSendUnicodeChar(0x0116)
2680      else if (CompKey = "a_capital") ; compose
2681      {
2682         Send {bs}�
2683         CompKey := ""
2684      }
2685      else if (CompKey = "o_capital")        ; compose
2686      {
2687         Send {bs}�
2688         CompKey := ""
2689      }     
2690      else
2691         sendinput {blind}E
2692   }
2693   else if Ebene = 3
2694      sendraw }
2695   else if Ebene = 4
2696      Sendinput {Blind}{Right}
2697   else if Ebene = 5
2698        SendUnicodeChar(0x03B5) ;epsilon
2699   else if Ebene = 6
2700        SendUnicodeChar(0x2203) ;es existiert   
2701   PriorDeadKey := ""   CompKey := ""
2702return
2703
2704neo_o:
2705   EbeneAktualisieren()
2706   if Ebene = 1
2707   {
2708      if (PriorDeadKey = "c1")        ; circumflex
2709         BSSendUnicodeChar(0x00F4)
2710      else if (PriorDeadKey = "a1")   ; akut
2711         BSSendUnicodeChar(0x00F3)
2712      else if (PriorDeadKey = "a2")   ; grave
2713         BSSendUnicodeChar(0x00F2)
2714      else if (PriorDeadKey = "t3")   ; Diaerese
2715         Send, {bs}�
2716      else if (PriorDeadKey = "t1")   ; tilde
2717         BSSendUnicodeChar(0x00F5)
2718      else if (PriorDeadKey = "t4")   ; doppelakut
2719         BSSendUnicodeChar(0x0151)
2720      else if (PriorDeadKey = "t5")   ; Schr�gstrich
2721         BSSendUnicodeChar(0x00F8)
2722      else if (PriorDeadKey = "t2")   ; macron
2723         BSSendUnicodeChar(0x014D)
2724      else if (PriorDeadKey = "c3")   ; brevis
2725         BSSendUnicodeChar(0x014F)
2726      else if (PriorDeadKey = "a4")   ; ogonek
2727         BSSendUnicodeChar(0x01EB)
2728      else if (PriorDeadKey = "c2")   ; caron
2729         BSSendUnicodeChar(0x01D2)                     
2730      else
2731         sendinput {blind}o
2732      if (PriorDeadKey = "comp")      ; compose
2733         CompKey := "o_small"
2734      else
2735         CompKey := ""
2736   }
2737   else if Ebene = 2
2738   {
2739      if (PriorDeadKey = "c1")        ; circumflex
2740         BSSendUnicodeChar(0x00D4)
2741      else if (PriorDeadKey = "a1")   ; akut
2742         BSSendUnicodeChar(0x00D3)
2743      else if (PriorDeadKey = "a2")   ; grave
2744         BSSendUnicodeChar(0x00D2)
2745      else if (PriorDeadKey = "t5")   ; Schr�gstrich
2746         BSSendUnicodeChar(0x00D8)
2747      else if (PriorDeadKey = "t1")   ; tilde
2748         BSSendUnicodeChar(0x00D5)
2749      else if (PriorDeadKey = "t4")   ; doppelakut
2750         BSSendUnicodeChar(0x0150)
2751      else if (PriorDeadKey = "t3")   ; Diaerese
2752         send {bs}�
2753      else if (PriorDeadKey = "t2")   ; macron
2754         BSSendUnicodeChar(0x014C)
2755      else if (PriorDeadKey = "c3")   ; brevis
2756         BSSendUnicodeChar(0x014E)
2757      else if (PriorDeadKey = "a4")   ; ogonek
2758         BSSendUnicodeChar(0x01EA)
2759      else if (PriorDeadKey = "c2")   ; caron
2760         BSSendUnicodeChar(0x01D1)   
2761      else
2762         sendinput {blind}O
2763      if (PriorDeadKey = "comp")      ; compose
2764         CompKey := "o_capital"
2765      else
2766         CompKey := ""
2767   }
2768   else if Ebene = 3
2769   {
2770      send *
2771      CompKey := ""
2772   }
2773   else if Ebene = 4
2774   {
2775      Send {blind}{End}
2776      CompKey := ""
2777   }
2778   else if Ebene = 5
2779   {
2780      SendUnicodeChar(0x03BF) ; omicron
2781      CompKey := ""
2782   }
2783   else if Ebene = 6
2784   {
2785      SendUnicodeChar(0x2208) ; element of
2786      CompKey := ""
2787   }
2788   PriorDeadKey := ""
2789return
2790
2791neo_s:
2792   EbeneAktualisieren()
2793   if Ebene = 1
2794   {
2795      if (PriorDeadKey = "c1")      ; circumflex
2796         BSSendUnicodeChar(0x015D)
2797      else if (PriorDeadKey = "a1") ; akut
2798         BSSendUnicodeChar(0x015B)
2799      else if (PriorDeadKey = "c2") ; caron
2800         BSSendUnicodeChar(0x0161)
2801      else if (PriorDeadKey = "a3") ; cedilla
2802         BSSendUnicodeChar(0x015F)
2803      else if (PriorDeadKey = "a5") ; punkt dar�ber
2804         BSSendUnicodeChar(0x1E61)
2805      else if (PriorDeadKey = "c6") ; punkt darunter
2806         BSSendUnicodeChar(0x1E63)
2807      else
2808      {
2809         if (LangSTastatur = 1)
2810         {
2811            if GetKeyState("CapsLock","T")
2812               sendinput {blind}s
2813            else
2814               SendUnicodeChar(0x017F) ; langes s
2815         }
2816         else
2817            sendinput {blind}s
2818      }
2819      if (PriorDeadKey = "comp")
2820         CompKey := "s_small"
2821      else
2822         CompKey := ""
2823   }
2824   else if Ebene = 2
2825   {
2826      if (PriorDeadKey = "c1")      ; circumflex
2827         BSSendUnicodeChar(0x015C)
2828      else if (PriorDeadKey = "c2") ; caron
2829         BSSendUnicodeChar(0x0160)
2830      else if (PriorDeadKey = "a1") ; akut
2831         BSSendUnicodeChar(0x015A)
2832      else if (PriorDeadKey = "a3") ; cedilla
2833         BSSendUnicodeChar(0x015E)
2834      else if (PriorDeadKey = "a5") ; punkt dar�ber
2835         BSSendUnicodeChar(0x1E60)
2836      else if (PriorDeadKey = "c6") ; punkt darunter
2837         BSSendUnicodeChar(0x1E62)
2838      else
2839      {
2840         if GetKeyState("CapsLock","T") && (LangSTastatur = 1)
2841            SendUnicodeChar(0x017F)
2842         else
2843            sendinput {blind}S
2844      }
2845      if (PriorDeadKey = "comp")
2846         CompKey := "s_capital"
2847      else
2848         CompKey := ""
2849   }
2850   else if Ebene = 3
2851   {
2852      send ?
2853      CompKey := ""
2854   }
2855   else if Ebene = 4
2856   {
2857      Send �
2858      CompKey := ""
2859   }
2860   else if Ebene = 5
2861   {
2862      SendUnicodeChar(0x03C3) ;sigma
2863      CompKey := ""
2864   }
2865   else if Ebene = 6
2866   {
2867      SendUnicodeChar(0x03A3)  ; Sigma
2868      CompKey := ""
2869   }
2870   PriorDeadKey := ""
2871return
2872
2873neo_n:
2874   EbeneAktualisieren()
2875   if Ebene = 1
2876   {
2877      if (PriorDeadKey = "a1")          ; akut
2878         BSSendUnicodeChar(0x0144)
2879      else if (PriorDeadKey = "t1")     ; tilde
2880         BSSendUnicodeChar(0x00F1)
2881      else if (PriorDeadKey = "c2")    ; caron
2882         BSSendUnicodeChar(0x0148)
2883      else if (PriorDeadKey = "a3")   ; cedilla
2884         BSSendUnicodeChar(0x0146)
2885      else if (PriorDeadKey = "a5") ; punkt dar�ber
2886         BSSendUnicodeChar(0x1E45)
2887      else
2888         sendinput {blind}n
2889   }
2890   else if Ebene = 2
2891   {
2892      if (PriorDeadKey = "c2")         ; caron
2893         BSSendUnicodeChar(0x0147)
2894      else if (PriorDeadKey = "t1")     ; tilde
2895         BSSendUnicodeChar(0x00D1)
2896      else if (PriorDeadKey = "a1")     ; akut
2897         BSSendUnicodeChar(0x0143)
2898      else if (PriorDeadKey = "a3")   ; cedilla
2899         BSSendUnicodeChar(0x0145)
2900      else if (PriorDeadKey = "a5") ; punkt dar�ber
2901         BSSendUnicodeChar(0x1E44)
2902      else
2903         sendinput {blind}N
2904   }
2905   else if Ebene = 3
2906      send (
2907   else if Ebene = 4
2908   {
2909      if (PriorDeadKey = "c1")            ; circumflex
2910         BSSendUnicodeChar(0x2074)
2911      else if (PriorDeadKey = "c4")       ; toter -
2912         BSSendUnicodeChar(0x2084)
2913      else
2914         Send 4
2915   }
2916   else if Ebene = 5
2917      SendUnicodeChar(0x03BD) ; nu
2918   else if Ebene = 6
2919      SendUnicodeChar(0x2115) ; N (nat�rliche Zahlen)
2920   PriorDeadKey := ""   CompKey := ""
2921return
2922
2923neo_r:
2924   EbeneAktualisieren()
2925   if Ebene = 1
2926   {
2927      if (PriorDeadKey = "a1")           ; akut
2928         BSSendUnicodeChar(0x0155)
2929      else if (PriorDeadKey = "c2")     ; caron
2930         BSSendUnicodeChar(0x0159)
2931      else if (PriorDeadKey = "a3")    ; cedilla
2932         BSSendUnicodeChar(0x0157)
2933      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2934         BSSendUnicodeChar(0x0E59)
2935      else if (PriorDeadKey = "c6") ; punkt darunter
2936         BSSendUnicodeChar(0x1E5B)
2937      else
2938         sendinput {blind}r
2939      if (PriorDeadKey = "comp")
2940         CompKey := "r_small"
2941      else
2942         CompKey := ""
2943   }
2944   else if Ebene = 2
2945   {
2946      if (PriorDeadKey = "c2")          ; caron
2947         BSSendUnicodeChar(0x0158)
2948      else if (PriorDeadKey = "a1")      ; akut
2949         BSSendUnicodeChar(0x0154)
2950      else if (PriorDeadKey = "a3")    ; cedilla
2951         BSSendUnicodeChar(0x0156)
2952      else if (PriorDeadKey = "a5")  ; punkt dar�ber
2953         BSSendUnicodeChar(0x1E58)
2954      else if (PriorDeadKey = "c6") ; punkt darunter
2955         BSSendUnicodeChar(0x1E5A)
2956      else
2957         sendinput {blind}R
2958      if (PriorDeadKey = "comp")
2959         CompKey := "r_capital"
2960      else
2961         CompKey := ""
2962   }
2963   else if Ebene = 3
2964   {
2965      send )
2966      CompKey := ""
2967   }
2968   else if Ebene = 4
2969   {
2970      if (PriorDeadKey = "c1")            ; circumflex
2971         BSSendUnicodeChar(0x2075)
2972      else if (PriorDeadKey = "c4")       ; toter -
2973         BSSendUnicodeChar(0x2085)
2974      else
2975         Send 5
2976      CompKey := ""
2977   }
2978   else if Ebene = 5
2979   {
2980      SendUnicodeChar(0x03F1) ; rho symbol (varrho)
2981      CompKey := ""
2982   }
2983   else if Ebene = 6
2984   {
2985      SendUnicodeChar(0x211D) ; R (reelle Zahlen)
2986      CompKey := ""
2987   }
2988   PriorDeadKey := ""
2989return
2990
2991neo_t:
2992     EbeneAktualisieren()
2993     if Ebene = 1
2994     {
2995        if (PriorDeadKey = "c2")          ; caron
2996           BSSendUnicodeChar(0x0165)
2997        else if (PriorDeadKey = "a3")    ; cedilla
2998           BSSendUnicodeChar(0x0163)
2999        else if (PriorDeadKey = "c4")   ; Querstrich
3000           BSSendUnicodeChar(0x0167)
3001        else if (PriorDeadKey = "a5")  ; punkt dar�ber
3002           BSSendUnicodeChar(0x1E6B)
3003        else if (PriorDeadKey = "c6") ; punkt darunter
3004           BSSendUnicodeChar(0x1E6D)
3005        else
3006           sendinput {blind}t
3007        if (PriorDeadKey = "comp")
3008           CompKey := "t_small"
3009        else
3010           CompKey := ""
3011     }
3012     else if Ebene = 2
3013     {
3014        if (PriorDeadKey = "c2")          ; caron
3015           BSSendUnicodeChar(0x0164)
3016        else if (PriorDeadKey = "a3")    ; cedilla
3017           BSSendUnicodeChar(0x0162)
3018        else if (PriorDeadKey = "c4")   ; Querstrich
3019           BSSendUnicodeChar(0x0166)
3020        else if (PriorDeadKey = "a5")  ; punkt dar�ber
3021           BSSendUnicodeChar(0x1E6A)
3022        else if (PriorDeadKey = "c6") ; punkt darunter
3023           BSSendUnicodeChar(0x1E6C)
3024        else
3025           sendinput {blind}T
3026        if (PriorDeadKey = "comp")
3027           CompKey := "t_capital"
3028        else
3029           CompKey := ""
3030     }
3031     else if Ebene = 3
3032     {
3033        send {blind}- ; Bis
3034        CompKey := ""
3035     }
3036     else if Ebene = 4
3037     {
3038        if (PriorDeadKey = "c1")            ; circumflex
3039           BSSendUnicodeChar(0x2076)
3040        else if (PriorDeadKey = "c4")       ; toter -
3041           BSSendUnicodeChar(0x2086)
3042        else
3043           Send 6
3044        CompKey := ""
3045     }
3046     else if Ebene = 5
3047     {
3048        SendUnicodeChar(0x03C4) ; tau
3049        CompKey := ""
3050     }
3051     else if Ebene = 6
3052     {
3053        SendUnicodeChar(0x2202 ) ; partielle Ableitung
3054        CompKey := ""
3055     }
3056     PriorDeadKey := ""
3057return
3058
3059neo_d:
3060   EbeneAktualisieren()
3061   if Ebene = 1
3062   {
3063      if (PriorDeadKey = "c4")        ; Querstrich
3064         BSSendUnicodeChar(0x0111)
3065      else if (PriorDeadKey = "t5")  ; Schr�gstrich
3066         BSSendUnicodeChar(0x00F0)
3067      else if (PriorDeadKey = "c2")     ; caron
3068         BSSendUnicodeChar(0x010F)
3069      else if (PriorDeadKey = "a5")  ; punkt dar�ber
3070         BSSendUnicodeChar(0x1E0B)
3071      else if (PriorDeadKey = "c6") ; punkt darunter
3072         BSSendUnicodeChar(0x1E0D)
3073      else
3074         sendinput {blind}d
3075   }
3076   else if Ebene = 2
3077   {
3078      if (PriorDeadKey = "c4")        ; Querstrich
3079         BSSendUnicodeChar(0x0110)
3080      else if (PriorDeadKey = "t5")  ; Schr�gstrich
3081         BSSendUnicodeChar(0x00D0)
3082      else if (PriorDeadKey = "c2")     ; caron
3083         BSSendUnicodeChar(0x010E)
3084      else if (PriorDeadKey = "a5")  ; punkt dar�ber
3085         BSSendUnicodeChar(0x1E0A)
3086      else if (PriorDeadKey = "c6") ; punkt darunter
3087         BSSendUnicodeChar(0x1E0D)
3088      else sendinput {blind}D
3089   }
3090   else if Ebene = 3
3091      send :
3092   else if Ebene = 4
3093     Send `,
3094   else if Ebene = 5
3095      SendUnicodeChar(0x03B4) ;delta
3096   else if Ebene = 6
3097      SendUnicodeChar(0x0394)  ; Delta
3098   PriorDeadKey := ""   CompKey := ""
3099return
3100
3101neo_y:
3102   EbeneAktualisieren()
3103   if Ebene = 1
3104   {
3105      if (PriorDeadKey = "t3")       ; Diaerese
3106         Send {bs}�
3107      else if (PriorDeadKey = "a1")      ; akut
3108         BSSendUnicodeChar(0x00FD)
3109      else if (PriorDeadKey = "c1")    ; circumflex
3110         BSSendUnicodeChar(0x0177)
3111      else
3112         sendinput {blind}y
3113   }
3114   else if Ebene = 2
3115   {
3116      if (PriorDeadKey = "a1")           ; akut
3117         BSSendUnicodeChar(0x00DD)
3118      else if (PriorDeadKey = "t3")    ; Diaerese
3119         Send {bs}�
3120      else if (PriorDeadKey = "c1")      ; circumflex
3121         BSSendUnicodeChar(0x0176)
3122      else
3123         sendinput {blind}Y
3124   }
3125   else if Ebene = 3
3126      send @
3127   else if Ebene = 4
3128      Send .
3129   else if Ebene = 5
3130      SendUnicodeChar(0x03C5) ; upsilon
3131   else if Ebene = 6
3132      SendUnicodeChar(0x2207) ; nabla
3133   PriorDeadKey := ""   CompKey := ""
3134return
3135
3136;SC02B (#) wird zu Mod3
3137
3138
3139/*
3140   ------------------------------------------------------
3141   Reihe 4
3142   ------------------------------------------------------
3143*/
3144
3145;SC056 (<) wird zu Mod4
3146
3147neo_�:
3148   EbeneAktualisieren()
3149   if Ebene = 1
3150   {
3151      if (PriorDeadKey = "t2")        ; macron
3152         BSSendUnicodeChar(0x01D6)
3153      else if (PriorDeadKey = "a1")   ; akut
3154         BSSendUnicodeChar(0x01D8)
3155      else if (PriorDeadKey = "a2")   ; grave
3156         BSSendUnicodeChar(0x01DC)
3157      else if (PriorDeadKey = "c2")   ; caron
3158         BSSendUnicodeChar(0x01DA)
3159      else
3160         sendinput {blind}�
3161   }
3162   else if Ebene = 2
3163   {
3164      if (PriorDeadKey = "t2")        ; macron
3165         BSSendUnicodeChar(0x01D5)
3166      else if (PriorDeadKey = "a1")   ; akut
3167         BSSendUnicodeChar(0x01D7)
3168      else if (PriorDeadKey = "a2")   ; grave
3169         BSSendUnicodeChar(0x01DB)
3170      else if (PriorDeadKey = "c2")   ; caron
3171         BSSendUnicodeChar(0x01D9)
3172      else
3173         sendinput {blind}�
3174   }
3175   else if Ebene = 3
3176      send {blind}{#}
3177   else if Ebene = 4
3178      Send {Esc}
3179   else if Ebene = 5
3180     {} ; leer
3181   else if Ebene = 6
3182      SendUnicodeChar(0x221D) ; proportional
3183
3184   PriorDeadKey := ""   CompKey := ""
3185return
3186
3187neo_�:
3188   EbeneAktualisieren()
3189   if Ebene = 1
3190   {
3191      if (PriorDeadKey = "t2")        ; macron
3192         BSSendUnicodeChar(0x022B)
3193      else
3194         sendinput {blind}�
3195   }
3196   else if Ebene = 2
3197   {
3198      if (PriorDeadKey = "t2")        ; macron
3199         BSSendUnicodeChar(0x022A)
3200      else
3201         sendinput {blind}�
3202   }
3203   else if Ebene = 3
3204      send $
3205   else if Ebene = 4
3206      goto neo_tab
3207   else if Ebene = 5
3208       {} ;leer
3209   else if Ebene = 6
3210      SendUnicodeChar(0x2111) ; Fraktur I
3211   PriorDeadKey := ""   CompKey := ""
3212return
3213
3214neo_�:
3215   EbeneAktualisieren()
3216   if Ebene = 1
3217   {
3218      if (PriorDeadKey = "t2")        ; macron
3219         BSSendUnicodeChar(0x01DF)
3220      else
3221         sendinput {blind}�
3222   }
3223   else if Ebene = 2
3224   {
3225      if (PriorDeadKey = "t2")        ; macron
3226         BSSendUnicodeChar(0x001DE)
3227      else
3228         sendinput {blind}�
3229   }
3230   else if Ebene = 3
3231      send |
3232   else if Ebene = 4
3233      Send {PgDn}    ; Next
3234   else if Ebene = 5
3235      SendUnicodeChar(0x03B7) ; eta
3236   else if Ebene = 6
3237      SendUnicodeChar(0x211C) ; altes R
3238   PriorDeadKey := ""   CompKey := ""
3239return
3240
3241neo_p:
3242   EbeneAktualisieren()
3243   if Ebene = 1
3244   {
3245      if (PriorDeadKey = "a5")      ; punkt dar�ber
3246         BSSendUnicodeChar(0x1E57)
3247      else
3248         sendinput {blind}p
3249   }
3250   else if Ebene = 2
3251   {
3252      if (PriorDeadKey = "a5")      ; punkt dar�ber
3253         BSSendUnicodeChar(0x1E56)
3254      else
3255         sendinput {blind}P
3256   }
3257   else if Ebene = 3
3258   {
3259      if (PriorDeadKey = "t1")    ; tilde
3260         BSSendUnicodeChar(0x2248)
3261      else
3262         sendraw ~
3263   }     
3264   else if Ebene = 4
3265        Send {Enter}
3266   else if Ebene = 5
3267      SendUnicodeChar(0x03C0) ;pi
3268   else if Ebene = 6
3269      SendUnicodeChar(0x03A0)  ; Pi
3270   PriorDeadKey := ""   CompKey := ""
3271return
3272
3273neo_z:
3274   EbeneAktualisieren()
3275   if Ebene = 1
3276   {
3277      if (PriorDeadKey = "c2")         ; caron
3278         BSSendUnicodeChar(0x017E)
3279      else if (PriorDeadKey = "a1")     ; akut
3280         BSSendUnicodeChar(0x017A)
3281      else if (PriorDeadKey = "a5") ; punkt dr�ber
3282         BSSendUnicodeChar(0x017C)
3283      else if (PriorDeadKey = "c6") ; punkt drunter
3284         BSSendUnicodeChar(0x1E93)
3285      else
3286         sendinput {blind}z
3287   }
3288   else if Ebene = 2
3289   {
3290      if (PriorDeadKey = "c2")         ; caron 
3291         BSSendUnicodeChar(0x017D)
3292      else if (PriorDeadKey = "a1")     ; akut
3293         BSSendUnicodeChar(0x0179)
3294      else if (PriorDeadKey = "a5") ; punkt dar�ber
3295         BSSendUnicodeChar(0x017B)
3296      else if (PriorDeadKey = "c6") ; punkt drunter
3297         BSSendUnicodeChar(0x1E92)
3298      else
3299         sendinput {blind}Z
3300   }
3301   else if Ebene = 3
3302      send ``{space} ; untot
3303   else if Ebene = 4
3304     {} ; leer   
3305   else if Ebene = 5
3306      SendUnicodeChar(0x03B6) ;zeta
3307   else if Ebene = 6
3308      SendUnicodeChar(0x2124)  ; Z (ganze Zahlen)
3309   PriorDeadKey := ""   CompKey := ""
3310return
3311
3312neo_b:
3313   EbeneAktualisieren()
3314   if Ebene = 1
3315   {
3316      if (PriorDeadKey = "a5")      ; punkt dar�ber
3317         BSSendUnicodeChar(0x1E03)
3318      else
3319         sendinput {blind}b
3320   }
3321   else if Ebene = 2
3322   {
3323      if (PriorDeadKey = "a5")       ; punkt dar�ber
3324         BSSendUnicodeChar(0x1E02)
3325      else
3326         sendinput {blind}B
3327   }
3328   else if Ebene = 3
3329      send {blind}{+}
3330   else if Ebene = 4
3331      send :
3332   else if Ebene = 5
3333      SendUnicodeChar(0x03B2) ; beta
3334   else if Ebene = 6
3335      SendUnicodeChar(0x21D2) ; Doppel-Pfeil rechts
3336   PriorDeadKey := ""   CompKey := ""
3337return
3338
3339neo_m:
3340   EbeneAktualisieren()
3341   if Ebene = 1
3342   {
3343      if (PriorDeadKey = "a5")       ; punkt dar�ber
3344         BSSendUnicodeChar(0x1E41)
3345      else if (PriorDeadKey = "c6") ; punkt darunter
3346         BSSendUnicodeChar(0x1E43)
3347      else if ( (CompKey = "t_small") or (CompKey = "t_capital") )       ; compose
3348         CompUnicodeChar(0x2122)          ; TM
3349      else if ( (CompKey = "s_small") or (CompKey = "s_capital") )       ; compose
3350         CompUnicodeChar(0x2120)          ; SM
3351      else
3352         sendinput {blind}m
3353   }
3354   else if Ebene = 2
3355   {
3356      if (PriorDeadKey = "a5")       ; punkt dar�ber
3357         BSSendUnicodeChar(0x1E40)
3358      else if (PriorDeadKey = "c6") ; punkt darunter
3359         BSSendUnicodeChar(0x1E42)
3360      else if ( (CompKey = "t_capital") or (CompKey = "t_small") )       ; compose
3361         CompUnicodeChar(0x2122)          ; TM
3362      else if ( (CompKey = "s_capital") or (CompKey = "s_small") )       ; compose
3363         CompUnicodeChar(0x2120)          ; SM
3364      else
3365         sendinput {blind}M
3366   }
3367   else if Ebene = 3
3368      send `%
3369   else if Ebene = 4
3370   {
3371      if (PriorDeadKey = "c1")            ; circumflex
3372         BSSendUnicodeChar(0x00B9)
3373      else if (PriorDeadKey = "c4")       ; toter -
3374         BSSendUnicodeChar(0x2081)
3375      else
3376         Send 1
3377   }
3378   else if Ebene = 5
3379      SendUnicodeChar(0x03BC) ; griechisch mu, micro w�re 0x00B5
3380   else if Ebene = 6
3381      SendUnicodeChar(0x21D4) ; doppelter Doppelpfeil (genau dann wenn)
3382   PriorDeadKey := ""   CompKey := ""
3383return
3384
3385neo_komma:
3386   EbeneAktualisieren()
3387   if Ebene = 1
3388       { 
3389         if GetKeyState("CapsLock","T")
3390         {
3391           if (IsModifierPressed())
3392           {
3393             send {blind},
3394           }
3395           else
3396           {
3397              send `,
3398           }
3399               
3400         }
3401         else
3402         {
3403           send {blind},
3404         }
3405       }
3406   else if Ebene = 2
3407       SendUnicodeChar(0x22EE) ;  vertikale ellipse
3408   else if Ebene = 3
3409      send "
3410   else if Ebene = 4
3411   {
3412      if (PriorDeadKey = "c1")            ; circumflex
3413         BSSendUnicodeChar(0x00B2)
3414      else if (PriorDeadKey = "c4")       ; toter -
3415         BSSendUnicodeChar(0x2082)
3416      else
3417         Send 2
3418   }
3419   else if Ebene = 5
3420      SendUnicodeChar(0x03C1) ; rho
3421   else if Ebene = 6
3422      SendUnicodeChar(0x21D0) ; Doppelpfeil links
3423   PriorDeadKey := ""   CompKey := ""
3424return
3425
3426neo_punkt:
3427   EbeneAktualisieren()
3428   if Ebene = 1
3429        { 
3430         if GetKeyState("CapsLock","T")
3431         {
3432           if (IsModifierPressed())
3433           {
3434             send {blind}.
3435           }
3436           else
3437           {
3438              send .
3439           }
3440               
3441         }
3442         else {
3443           send {blind}.
3444         }
3445       }
3446  else if Ebene = 2
3447      SendUnicodeChar(0x2026)  ; ellipse
3448   else if Ebene = 3
3449      send '
3450   else if Ebene = 4
3451   {
3452      if (PriorDeadKey = "c1")            ; circumflex
3453         BSSendUnicodeChar(0x00B3)
3454      else if (PriorDeadKey = "c4")       ; toter -
3455         BSSendUnicodeChar(0x2083)
3456      else
3457         Send 3
3458   }
3459   else if Ebene = 5
3460      SendUnicodeChar(0x03D1) ; theta symbol (vartheta)
3461   else if Ebene = 6
3462      SendUnicodeChar(0x0398)  ; Theta
3463   PriorDeadKey := ""   CompKey := ""
3464return
3465
3466
3467neo_j:
3468   EbeneAktualisieren()
3469   if Ebene = 1
3470   {
3471      if (PriorDeadKey = "c1")           ; circumflex
3472         BSSendUnicodeChar(0x0135)
3473      else if (PriorDeadKey = "c2")      ; caron
3474         BSSendUnicodeChar(0x01F0)
3475      else if (CompKey = "i_small")        ; compose
3476         CompUnicodeChar(0x0133)          ; ij
3477      else if (CompKey = "l_small")        ; compose
3478         CompUnicodeChar(0x01C9)          ; lj
3479      else if (CompKey = "l_capital")       ; compose
3480         CompUnicodeChar(0x01C8)          ; Lj
3481      else
3482         sendinput {blind}j
3483   }
3484   else if Ebene = 2
3485   {
3486      if (PriorDeadKey = "c1")            ; circumflex
3487         BSSendUnicodeChar(0x0134)
3488      else if (CompKey = "i_capital")        ; compose
3489         CompUnicodeChar(0x0132)          ; IJ
3490      else if (CompKey = "l_capital")        ; compose
3491         CompUnicodeChar(0x01C7)          ; LJ
3492      else
3493         sendinput {blind}J
3494   }
3495   else if Ebene = 3
3496      send `;
3497   else if Ebene = 4
3498     Send `;
3499   else if Ebene = 5
3500      SendUnicodeChar(0x03B8) ; theta
3501   else if Ebene = 6
3502      SendUnicodeChar(0x2261) ; identisch
3503   PriorDeadKey := ""   CompKey := ""
3504return
3505
3506/*
3507   ------------------------------------------------------
3508   Numpad
3509   ------------------------------------------------------
3510
3511   folgende Tasten verhalten sich bei ein- und ausgeschaltetem
3512   NumLock gleich:
3513*/
3514
3515neo_NumpadDiv:
3516   EbeneAktualisieren()
3517   if ( (Ebene = 1) or (Ebene = 2) )
3518      send {NumpadDiv}
3519   else if Ebene = 3
3520      send �
3521   else if ( (Ebene = 4) or (Ebene = 5) )
3522      SendUnicodeChar(0x2215)   ; slash
3523   PriorDeadKey := ""   CompKey := ""
3524return
3525
3526neo_NumpadMult:
3527   EbeneAktualisieren()
3528   if ( (Ebene = 1) or (Ebene = 2) )
3529      send {NumpadMult}
3530   else if Ebene = 3
3531      send �
3532   else if ( (Ebene = 4) or (Ebene = 5) )
3533      SendUnicodeChar(0x22C5)  ; cdot
3534   PriorDeadKey := ""   CompKey := ""
3535return
3536
3537neo_NumpadSub:
3538   EbeneAktualisieren()
3539   if ( (Ebene = 1) or (Ebene = 2) )
3540   {
3541      if (PriorDeadKey = "c1")          ; circumflex
3542         BSSendUnicodeChar(0x207B)
3543      else if (PriorDeadKey = "c4")       ; toter -
3544         BSSendUnicodeChar(0x208B)         
3545      else
3546         send {blind}{NumpadSub}
3547   }
3548   else if Ebene = 3
3549      SendUnicodeChar(0x2212) ; echtes minus
3550   PriorDeadKey := ""   CompKey := ""
3551return
3552
3553neo_NumpadAdd:
3554   EbeneAktualisieren()
3555   if ( (Ebene = 1) or (Ebene = 2) )
3556   {
3557      if (PriorDeadKey = "c1")          ; circumflex
3558         BSSendUnicodeChar(0x207A)
3559      else if (PriorDeadKey = "c4")       ; toter -
3560         BSSendUnicodeChar(0x208A)         
3561      else
3562         send {blind}{NumpadAdd}
3563   }
3564   else if Ebene = 3
3565      send �
3566   else if ( (Ebene = 4) or (Ebene = 5) )
3567      SendUnicodeChar(0x2213)   ; -+
3568   PriorDeadKey := ""   CompKey := ""
3569return
3570
3571neo_NumpadEnter:
3572   EbeneAktualisieren()
3573   if ( (Ebene = 1) or (Ebene = 2) )
3574      send {NumpadEnter}     
3575   else if Ebene = 3
3576      SendUnicodeChar(0x2260) ; neq
3577   else if ( (Ebene = 4) or (Ebene = 5) )
3578      SendUnicodeChar(0x2248) ; approx
3579   PriorDeadKey := ""   CompKey := ""
3580return
3581
3582/*
3583   folgende Tasten verhalten sich bei ein- und ausgeschaltetem NumLock
3584   unterschiedlich:
3585
3586   bei NumLock ein
3587*/
3588
3589
3590
3591neo_Numpad7:
3592   EbeneAktualisieren()
3593   if Ebene = 1
3594   {
3595      send {blind}{Numpad7}
3596      if (PriorDeadKey = "comp")
3597         CompKey := "Num_7"
3598      else
3599         CompKey := ""       
3600   }
3601   else if Ebene = 2
3602   {
3603      send {NumpadHome}
3604      CompKey := ""
3605   }
3606   else if Ebene = 3
3607   {
3608      SendUnicodeChar(0x2195)   ; Hoch-Runter-Pfeil
3609      CompKey := ""
3610   }
3611   else if ( (Ebene = 4) or (Ebene = 5) )
3612   {
3613      SendUnicodeChar(0x226A)  ; ll
3614      CompKey := ""
3615   }
3616   PriorDeadKey := ""
3617return
3618
3619neo_Numpad8:
3620   EbeneAktualisieren()
3621   if Ebene = 1
3622   {
3623      if (CompKey = "Num_1")
3624         CompUnicodeChar(0x215B)       ; 1/8
3625      else if (CompKey = "Num_3")
3626         CompUnicodeChar(0x215C)       ; 3/8
3627      else if (CompKey = "Num_5")
3628         CompUnicodeChar(0x215D)       ; 5/8
3629      else if (CompKey = "Num_7")
3630         CompUnicodeChar(0x215E)       ; 7/8
3631      else
3632         send {blind}{Numpad8}
3633      if (PriorDeadKey = "comp")
3634         CompKey := "Num_8"
3635      else
3636         CompKey := ""
3637   }
3638   else if Ebene = 2
3639   {
3640      send {NumpadUp}
3641      CompKey := ""
3642   }
3643   else if Ebene = 3
3644   {
3645      SendUnicodeChar(0x2191)     ; uparrow
3646      CompKey := ""
3647   }
3648   else if ( (Ebene = 4) or (Ebene = 5) )
3649   {
3650      SendUnicodeChar(0x2229)    ; intersection
3651      CompKey := ""
3652   }
3653   PriorDeadKey := ""   CompKey := ""
3654return
3655
3656neo_Numpad9:
3657   EbeneAktualisieren()
3658   if Ebene = 1
3659   {
3660      send {blind}{Numpad9}
3661      if (PriorDeadKey = "comp")
3662         CompKey := "Num_9"
3663      else
3664         CompKey := ""
3665   }
3666   else if Ebene = 2
3667   {
3668      send {NumpadPgUp}
3669      CompKey := ""
3670   }
3671   else if Ebene = 3
3672   {
3673      SendUnicodeChar(0x2297) ; Tensorprodukt ; Vektor in die Ebene zeigend
3674      CompKey := ""
3675   }
3676   else if ( (Ebene = 4) or (Ebene = 5) )
3677   {
3678      SendUnicodeChar(0x226B)  ; gg
3679      CompKey := ""
3680   }
3681   PriorDeadKey := ""
3682return
3683
3684
3685
3686neo_Numpad4:
3687   EbeneAktualisieren()
3688   if Ebene = 1
3689   {
3690      if (CompKey = "Num_1")
3691         CompUnicodeChar(0x00BC)       ; 1/4
3692      else if (CompKey = "Num_3")
3693         CompUnicodeChar(0x00BE)       ; 3/4
3694      else
3695         send {blind}{Numpad4}
3696      if (PriorDeadKey = "comp")
3697         CompKey := "Num_4"
3698      else
3699         CompKey := ""
3700   }
3701   else if Ebene = 2
3702   {
3703      send {NumpadLeft}
3704      CompKey := ""
3705   }
3706   else if Ebene = 3
3707   {
3708      SendUnicodeChar(0x2190)     ; leftarrow
3709      CompKey := ""
3710   }
3711   else if ( (Ebene = 4) or (Ebene = 5) )
3712   {
3713      SendUnicodeChar(0x2282)  ; subset of
3714      CompKey := ""
3715   }
3716   PriorDeadKey := ""
3717return
3718
3719neo_Numpad5:
3720   EbeneAktualisieren()
3721   if Ebene = 1
3722   {
3723      if (CompKey = "Num_1")
3724         CompUnicodeChar(0x2155)       ; 1/5
3725      else if (CompKey = "Num_2")
3726         CompUnicodeChar(0x2156)       ; 2/5
3727      else if (CompKey = "Num_3")
3728         CompUnicodeChar(0x2157)       ; 3/5
3729      else if (CompKey = "Num_4")
3730         CompUnicodeChar(0x2158)       ; 4/5
3731      else
3732         send {blind}{Numpad5}
3733      if (PriorDeadKey = "comp")
3734         CompKey := "Num_5"
3735      else
3736         CompKey := ""
3737   }
3738   else if Ebene = 2
3739   {
3740      send {NumpadClear}
3741      CompKey := ""
3742   }
3743   else if Ebene = 3
3744   {
3745      SendUnicodeChar(0x221E) ; INFINITY
3746      CompKey := ""
3747   }
3748   else if ( (Ebene = 4) or (Ebene = 5) )
3749   {
3750      SendUnicodeChar(0x220B) ; enth�lt das Element
3751      CompKey := ""
3752   }
3753   PriorDeadKey := ""
3754return
3755
3756neo_Numpad6:
3757   EbeneAktualisieren()
3758   if Ebene = 1
3759   {
3760      if (CompKey = "Num_1")
3761         CompUnicodeChar(0x2159)       ; 1/6
3762      else if (CompKey = "Num_5")
3763         CompUnicodeChar(0x215A)       ; 5/6
3764      else
3765         send {blind}{Numpad6}
3766      if (PriorDeadKey = "comp")
3767         CompKey := "Num_6"
3768      else
3769         CompKey := ""
3770   }
3771   else if Ebene = 2
3772   {
3773      send {NumpadRight}
3774      CompKey := ""
3775   }
3776   else if Ebene = 3
3777   {
3778      SendUnicodeChar(0x2192)     ; rightarrow
3779      CompKey := ""
3780   }
3781   else if ( (Ebene = 4) or (Ebene = 5) )
3782   {
3783      SendUnicodeChar(0x2283) ; superset of
3784      CompKey := ""
3785   }
3786   PriorDeadKey := ""
3787return
3788
3789neo_Numpad1:
3790   EbeneAktualisieren()
3791   if Ebene = 1
3792   {
3793      send {blind}{Numpad1}
3794      if (PriorDeadKey = "comp")
3795         CompKey := "Num_1"
3796      else
3797         CompKey := ""
3798   }
3799   else if Ebene = 2
3800   {
3801      send {NumpadEnd}
3802      CompKey := ""
3803   }
3804   else if Ebene = 3
3805   {
3806      SendUnicodeChar(0x2194) ; Links-Rechts-Pfeil
3807      CompKey := ""
3808   }
3809   else if ( (Ebene = 4) or (Ebene = 5) )
3810   {
3811      SendUnicodeChar(0x2264)   ; leq
3812      CompKey := ""
3813   }
3814   PriorDeadKey := ""
3815return
3816
3817neo_Numpad2:
3818   EbeneAktualisieren()
3819   if Ebene = 1
3820   {
3821      if (CompKey = "Num_1")
3822         CompUnicodeChar(0x00BD)       ; 1/2
3823      else
3824         send {blind}{Numpad2}
3825      if (PriorDeadKey = "comp")
3826         CompKey := "Num_2"
3827      else
3828         CompKey := ""
3829   }
3830   else if Ebene = 2
3831   {
3832      send {NumpadDown}
3833      CompKey := ""
3834   }
3835   else if Ebene = 3
3836   {
3837      SendUnicodeChar(0x2193)     ; downarrow
3838      CompKey := ""
3839   }
3840   else if ( (Ebene = 4) or (Ebene = 5) )
3841   {
3842      SendUnicodeChar(0x222A)  ; vereinigt
3843      CompKey := ""
3844   }
3845   PriorDeadKey := ""
3846return
3847
3848neo_Numpad3:
3849   EbeneAktualisieren()
3850   if Ebene = 1
3851   {
3852      if (CompKey = "Num_1")
3853         CompUnicodeChar(0x2153)       ; 1/3
3854      else if (CompKey = "Num_2")
3855         CompUnicodeChar(0x2154)       ; 2/3
3856      else
3857         send {blind}{Numpad3}
3858      if (PriorDeadKey = "comp")
3859         CompKey := "Num_3"
3860      else
3861         CompKey := ""
3862   }
3863   else if Ebene = 2
3864      send {NumpadPgDn}
3865   else if Ebene = 3
3866      SendUnicodeChar(0x21CC) ; RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
3867   else if ( (Ebene = 4) or (Ebene = 5) )
3868      SendUnicodeChar(0x2265)  ; geq
3869   PriorDeadKey := ""   CompKey := ""
3870return
3871
3872neo_Numpad0:
3873   EbeneAktualisieren()
3874   if Ebene = 1
3875   {
3876      send {blind}{Numpad0}
3877      if (PriorDeadKey = "comp")
3878         CompKey := "Num_0"
3879      else
3880         CompKey := ""
3881   }
3882   else if Ebene = 2
3883   {
3884      send {NumpadIns}
3885      CompKey := ""
3886   }
3887   else if Ebene = 3
3888   {
3889      send `%
3890      CompKey := ""
3891   }
3892   else if ( (Ebene = 4) or (Ebene = 5) )
3893   {
3894      send �
3895      CompKey := ""
3896   }
3897   PriorDeadKey := ""
3898return
3899
3900neo_NumpadDot:
3901   EbeneAktualisieren()
3902   if Ebene = 1
3903   {
3904      send {NumpadDot}
3905      CompKey := ""
3906   }
3907   else if Ebene = 2
3908   {
3909      send {NumpadDel}
3910      CompKey := ""
3911   }
3912   else if Ebene = 3
3913   {
3914      send .
3915      CompKey := ""
3916   }
3917   else if ( (Ebene = 4) or (Ebene = 5) )
3918   {
3919      send `,
3920      CompKey := ""
3921   }
3922   PriorDeadKey := ""
3923return
3924
3925/*
3926   bei NumLock aus
3927*/
3928
3929neo_NumpadHome:
3930   EbeneAktualisieren()
3931   if Ebene = 1
3932   {
3933      send {NumpadHome}
3934      CompKey := ""
3935   }
3936   else if Ebene = 2
3937   {
3938      send {Numpad7}
3939      if (PriorDeadKey = "comp")
3940         CompKey := "Num_7"
3941      else
3942         CompKey := ""
3943   }
3944   else if ( (Ebene = 4) or (Ebene = 5) )
3945   {
3946      SendUnicodeChar(0x226A)  ; ll
3947      CompKey := ""
3948   }
3949   PriorDeadKey := ""
3950return
3951
3952neo_NumpadUp:
3953   EbeneAktualisieren()
3954   if Ebene = 1
3955   {
3956      send {NumpadUp}
3957      CompKey := ""
3958   }
3959   else if Ebene = 2
3960   {
3961      if (CompKey = "Num_1")
3962         CompUnicodeChar(0x215B)       ; 1/8
3963      else if (CompKey = "Num_3")
3964         CompUnicodeChar(0x215C)       ; 3/8
3965      else if (CompKey = "Num_5")
3966         CompUnicodeChar(0x215D)       ; 5/8
3967      else if (CompKey = "Num_7")
3968         CompUnicodeChar(0x215E)       ; 7/8
3969      else
3970         send {Numpad8}
3971      if (PriorDeadKey = "comp")
3972         CompKey := "Num_8"
3973      else
3974         CompKey := ""
3975   }
3976   else if Ebene = 3
3977   {
3978      SendUnicodeChar(0x2191)     ; uparrow
3979      CompKey := ""
3980   }
3981   else if ( (Ebene = 4) or (Ebene = 5) )
3982   {
3983      SendUnicodeChar(0x2229)    ; intersection
3984      CompKey := ""
3985   }
3986   PriorDeadKey := ""
3987return
3988
3989neo_NumpadPgUp:
3990   EbeneAktualisieren()
3991   if Ebene = 1
3992   {
3993      send {NumpadPgUp}
3994      CompKey := ""
3995   }
3996   else if Ebene = 2
3997   {
3998      send {Numpad9}
3999      if (PriorDeadKey = "comp")
4000         CompKey := "Num_9"
4001      else
4002         CompKey := ""
4003   }
4004   else if ( (Ebene = 4) or (Ebene = 5) )
4005   {
4006
4007      SendUnicodeChar(0x226B)  ; gg
4008      CompKey := ""
4009   }
4010   PriorDeadKey := ""
4011return
4012
4013neo_NumpadLeft:
4014   EbeneAktualisieren()
4015   if Ebene = 1
4016   {
4017      send {NumpadLeft}
4018      CompKey := ""
4019   }
4020   else if Ebene = 2
4021   {
4022      if (CompKey = "Num_1")
4023         CompUnicodeChar(0x00BC)       ; 1/4
4024      else if (CompKey = "Num_3")
4025         CompUnicodeChar(0x00BE)       ; 3/4
4026      else
4027         send {Numpad4}
4028      if (PriorDeadKey = "comp")
4029         CompKey := "Num_4"
4030      else
4031         CompKey := ""
4032   }
4033   else if Ebene = 3
4034   {
4035      SendUnicodeChar(0x2190)     ; leftarrow
4036      CompKey := ""
4037   }
4038   else if ( (Ebene = 4) or (Ebene = 5) )
4039   {
4040      SendUnicodeChar(0x2282)  ; subset of
4041      CompKey := ""
4042   }
4043   PriorDeadKey := ""
4044return
4045
4046neo_NumpadClear:
4047   EbeneAktualisieren()
4048   if Ebene = 1
4049   {
4050      send {NumpadClear}
4051      CompKey := ""
4052   }
4053   else if Ebene = 2
4054   {
4055      if (CompKey = "Num_1")
4056         CompUnicodeChar(0x2155)       ; 1/5
4057      else if (CompKey = "Num_2")
4058         CompUnicodeChar(0x2156)       ; 2/5
4059      else if (CompKey = "Num_3")
4060         CompUnicodeChar(0x2157)       ; 3/5
4061      else if (CompKey = "Num_4")
4062         CompUnicodeChar(0x2158)       ; 4/5
4063      else
4064         send {Numpad5}
4065      if (PriorDeadKey = "comp")
4066         CompKey := "Num_5"
4067      else
4068         CompKey := ""
4069   }
4070   else if Ebene = 3
4071   {
4072      send �
4073      CompKey := ""
4074   }
4075   else if ( (Ebene = 4) or (Ebene = 5) )
4076   {
4077      SendUnicodeChar(0x220A) ; small element of
4078      CompKey := ""
4079   }
4080   PriorDeadKey := ""
4081return
4082
4083neo_NumpadRight:
4084   EbeneAktualisieren()
4085   if Ebene = 1
4086   {
4087      send {NumpadRight}
4088      CompKey := ""
4089   }
4090   else if Ebene = 2
4091   {
4092      if (CompKey = "Num_1")
4093         CompUnicodeChar(0x2159)       ; 1/6
4094      else if (CompKey = "Num_5")
4095         CompUnicodeChar(0x215A)       ; 5/6
4096      else
4097         send {Numpad6}
4098      if (PriorDeadKey = "comp")
4099         CompKey := "Num_6"
4100      else
4101         CompKey := ""
4102   }
4103   else if Ebene = 3
4104   {
4105      SendUnicodeChar(0x2192)     ; rightarrow
4106      CompKey := ""
4107   }
4108   else if ( (Ebene = 4) or (Ebene = 5) )
4109   {
4110      SendUnicodeChar(0x2283) ; superset of
4111      CompKey := ""
4112   }
4113   PriorDeadKey := ""
4114return
4115
4116neo_NumpadEnd:
4117   EbeneAktualisieren()
4118   if Ebene = 1
4119   {
4120      send {NumpadEnd}
4121      CompKey := ""
4122   }
4123   else if Ebene = 2
4124   {
4125      send {Numpad1}
4126      if (PriorDeadKey = "comp")
4127         CompKey := "Num_1"
4128      else
4129         CompKey := ""
4130   }
4131   else if Ebene = 3
4132   {
4133      SendUnicodeChar(0x21CB) ; LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON
4134      CompKey := ""
4135   }
4136   else if ( (Ebene = 4) or (Ebene = 5) )
4137   {
4138      SendUnicodeChar(0x2264)   ; leq
4139      CompKey := ""
4140   }
4141   PriorDeadKey := ""
4142return
4143
4144neo_NumpadDown:
4145   EbeneAktualisieren()
4146   if Ebene = 1
4147   {
4148      send {NumpadDown}
4149      CompKey := ""
4150   }
4151   else if Ebene = 2
4152   {
4153      if (CompKey = "Num_1")
4154         CompUnicodeChar(0x00BD)       ; 1/2
4155      else
4156         send {Numpad2}
4157      if (PriorDeadKey = "comp")
4158         CompKey := "Num_2"
4159      else
4160         CompKey := ""
4161   }
4162   else if Ebene = 3
4163   {
4164      SendUnicodeChar(0x2193)     ; downarrow
4165      CompKey := ""
4166   }
4167   else if ( (Ebene = 4) or (Ebene = 5) )
4168   {
4169      SendUnicodeChar(0x222A)  ; vereinigt
4170      CompKey := ""
4171   }
4172   PriorDeadKey := ""
4173return
4174
4175neo_NumpadPgDn:
4176   EbeneAktualisieren()
4177   if Ebene = 1
4178   {
4179      send {NumpadPgDn}
4180      CompKey := ""
4181   }
4182   else if Ebene = 2
4183   {
4184      if (CompKey = "Num_1")
4185         CompUnicodeChar(0x2153)       ; 1/3
4186      else if (CompKey = "Num_2")
4187         CompUnicodeChar(0x2154)       ; 2/3
4188      else
4189         send {Numpad3}
4190      if (PriorDeadKey = "comp")
4191         CompKey := "Num_3"
4192      else
4193         CompKey := ""
4194   }
4195   else if Ebene = 3
4196   {
4197      SendUnicodeChar(0x21CC) ; RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON   
4198      CompKey := ""
4199   }
4200   else if ( (Ebene = 4) or (Ebene = 5) )
4201   {
4202      SendUnicodeChar(0x2265)  ; geq
4203      CompKey := ""
4204   }
4205   PriorDeadKey := ""
4206return
4207
4208neo_NumpadIns:
4209   EbeneAktualisieren()
4210   if Ebene = 1
4211   {
4212      send {NumpadIns}
4213      CompKey := ""
4214   }
4215   else if Ebene = 2
4216   {
4217      send {Numpad0}
4218      if (PriorDeadKey = "comp")
4219         CompKey := "Num_0"
4220      else
4221         CompKey := ""
4222   }
4223   else if Ebene = 3
4224   {
4225      send `%
4226      CompKey := ""
4227   }
4228   else if ( (Ebene = 4) or (Ebene = 5) )
4229   {
4230      send �
4231      CompKey := ""
4232   }
4233   PriorDeadKey := ""
4234return
4235
4236neo_NumpadDel:
4237   EbeneAktualisieren()
4238   if Ebene = 1
4239   {
4240      send {NumpadDel}
4241      CompKey := ""
4242   }
4243   else if Ebene = 2
4244   {
4245      send {NumpadDot}
4246      CompKey := ""
4247   }
4248   else if Ebene = 3
4249   {
4250      send .
4251      CompKey := ""
4252   }
4253   else if ( (Ebene = 4) or (Ebene = 5) )
4254   {
4255      send `,
4256      CompKey := ""
4257   }
4258   PriorDeadKey := ""
4259return
4260
4261
4262/*
4263   ------------------------------------------------------
4264   Sondertasten
4265   ------------------------------------------------------
4266*/
4267*space::
4268   if (einHandNeo)
4269    spacepressed := 1
4270   else
4271    goto neo_SpaceUp
4272return
4273
4274*space up::
4275   if (einHandNeo)
4276   {
4277     if (keypressed)
4278     {
4279       keypressed := 0
4280       spacepressed := 0   
4281     }
4282     else
4283     {
4284        goto neo_SpaceUp
4285     }
4286   }
4287   else
4288     { } ;do nothing
4289return
4290
4291neo_SpaceUp:
4292     EbeneAktualisieren()
4293     if Ebene = 1
4294     {
4295        if (CompKey = "r_small_1")
4296           Comp3UnicodeChar(0x2170)          ; r�misch i
4297        else if (CompKey = "r_capital_1")
4298           Comp3UnicodeChar(0x2160)          ; r�misch I
4299        else
4300           Send {blind}{Space}
4301     }
4302     if  Ebene  =  2
4303        Send  {blind}{Space}
4304     if Ebene = 3
4305        Send {blind}{Space}
4306     if Ebene = 4
4307     {
4308        if (PriorDeadKey = "c1")            ; circumflex
4309           BSSendUnicodeChar(0x2070)
4310        else if (PriorDeadKey = "c4")       ; toter -
4311           BSSendUnicodeChar(0x2080)
4312        else
4313           Send 0
4314     }
4315     else if Ebene = 5
4316        SendUnicodeChar(0x00A0)   ; gesch�tztes Leerzeichen
4317     else if Ebene = 6
4318        SendUnicodeChar(0x202F) ; schmales Leerzeichen
4319     PriorDeadKey := ""   CompKey := ""
4320  spacepressed := 0     
4321  keypressed := 0       
4322return
4323
4324/*
4325*Space::
4326   EbeneAktualisieren()
4327   if Ebene = 1
4328   {
4329      if (CompKey = "r_small_1")
4330         Comp3UnicodeChar(0x2170)          ; r�misch i
4331      else if (CompKey = "r_capital_1")
4332         Comp3UnicodeChar(0x2160)          ; r�misch I
4333      else
4334         Send {blind}{Space}
4335   }
4336   if  Ebene  =  2
4337      Send  {blind}{Space}
4338   if Ebene = 3
4339      Send {blind}{Space}
4340   if Ebene = 4
4341   {
4342      if (PriorDeadKey = "c1")            ; circumflex
4343         BSSendUnicodeChar(0x2070)
4344      else if (PriorDeadKey = "c4")       ; toter -
4345         BSSendUnicodeChar(0x2080)
4346      else
4347         Send 0
4348   }
4349   else if Ebene = 5
4350      SendUnicodeChar(0x00A0)   ; gesch�tztes Leerzeichen
4351   else if Ebene = 6
4352      SendUnicodeChar(0x202F) ; schmales Leerzeichen
4353   PriorDeadKey := ""   CompKey := ""
4354return
4355*/
4356/*
4357   Folgende Tasten sind nur aufgef�hrt, um PriorDeadKey zu leeren.
4358   Irgendwie sieht das noch nicht sch�n aus. Vielleicht l�sst sich dieses
4359   Problem irgendwie eleganter l�sen...
4360   
4361   Nachtrag:
4362   Weil es mit Alt+Tab Probleme gab, wird hier jetzt erstmal rumgeflickschustert,
4363   bis eine allgemeinere L�sung gefunden wurde.
4364*/
4365
4366*Enter::
4367   if ( not(lernModus) or (lernModus_std_Return) )
4368   {
4369     sendinput {Blind}{Enter}
4370     PriorDeadKey := ""   CompKey := ""
4371   }
4372return
4373
4374*Backspace::
4375   if ( not(lernModus) or (lernModus_std_Backspace) )
4376   {
4377     sendinput {Blind}{Backspace}
4378     PriorDeadKey := ""   CompKey := ""
4379   }
4380return
4381
4382*Del::
4383   if ( not(lernModus) or (lernModus_std_Entf) )
4384   {
4385     sendinput {Blind}{Del}
4386   }
4387return
4388
4389*Ins::
4390   if ( not(lernModus) or (lernModus_std_Einf) )
4391   {
4392     sendinput {Blind}{Ins}
4393   }
4394return
4395
4396
4397
4398
4399
4400/*
4401Auf Mod3+Tab liegt Compose. AltTab funktioniert, jedoch ShiftAltTab nicht.
4402Wenigstens kommt es jetzt nicht mehr zu komischen Ergebnissen, wenn man Tab
4403nach einem DeadKey dr�ckt...
4404*/
4405
4406neo_tab:
4407   if ( GetKeyState("SC038","P") )
4408   {
4409    Send,{Blind}{AltDown}{tab}
4410   
4411/*
4412     if (isShiftPressed())
4413     {
4414      Send,{ShiftDown}{AltDown}{tab}
4415     }
4416     else
4417     {       
4418;       msgbox alt+tab
4419        Send,{AltDown}{tab}
4420      ; SC038 & Tab::AltTab            ; http://de.autohotkey.com/docs/Hotkeys.htm#AltTabDetail
4421     }
4422*/
4423   }
4424   else if (IsMod3Pressed()) ;#
4425   {
4426      #Include *i %a_scriptdir%\ComposeLaunch.ahk
4427      #Include *i %a_scriptdir%\Source\ComposeLaunch.ahk
4428      PriorDeadKey := "comp"
4429      CompKey := ""
4430   }
4431   else
4432   {
4433      send {blind}{Tab}
4434      PriorDeadKey := ""
4435      CompKey := ""
4436   }
4437return
4438
4439*SC038 up::
4440   PriorDeadKey := ""   CompKey := ""
4441   send {blind}{AltUp}
4442return
4443   
4444*SC038 down::                    ; LAlt, damit AltTab funktioniert
4445    Send,{Blind}{AltDown}
4446   PriorDeadKey := ""   CompKey := ""
4447return
4448
4449*Home::
4450   if ( not(lernModus) or (lernModus_std_Pos1) )
4451   {
4452     sendinput {Blind}{Home}
4453     PriorDeadKey := ""   CompKey := ""
4454   }
4455return
4456
4457*End::
4458   if ( not(lernModus) or (lernModus_std_Ende) )
4459   {
4460     sendinput {Blind}{End}
4461     PriorDeadKey := ""   CompKey := ""
4462   }
4463return
4464
4465*PgUp::
4466   if ( not(lernModus) or (lernModus_std_PgUp) )
4467   {
4468     sendinput {Blind}{PgUp}
4469     PriorDeadKey := ""   CompKey := ""
4470   }
4471return
4472
4473*PgDn::
4474   if ( not(lernModus) or (lernModus_std_PgDn) )
4475   {
4476     sendinput {Blind}{PgDn}
4477     PriorDeadKey := ""   CompKey := ""
4478   }
4479return
4480
4481*Up::
4482   if ( not(lernModus) or (lernModus_std_Hoch) )
4483   {
4484     sendinput {Blind}{Up}
4485     PriorDeadKey := ""   CompKey := ""
4486   }
4487return
4488
4489*Down::
4490   if ( not(lernModus) or (lernModus_std_Runter) )
4491   {
4492     sendinput {Blind}{Down}
4493     PriorDeadKey := ""   CompKey := ""
4494   }
4495return
4496
4497*Left::
4498   if ( not(lernModus) or (lernModus_std_Links) )
4499   {
4500     sendinput {Blind}{Left}
4501     PriorDeadKey := ""   CompKey := ""
4502   }
4503return
4504
4505*Right::
4506   if ( not(lernModus) or (lernModus_std_Rechts) )
4507   {
4508     sendinput {Blind}{Right}
4509     PriorDeadKey := ""   CompKey := ""
4510   }
4511return
4512
4513
4514
4515
4516/*
4517   ------------------------------------------------------
4518   Methode KeyboardLED zur Steuerung der Keyboard-LEDs
4519   (NumLock/CapsLock/ScrollLock-Lichter)
4520   
4521   Benutzungshinweise: Man benutze
4522   KeyboardLED(LEDvalue,"Cmd"), wobei
4523   Cmd = on/off/switch,
4524   LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4
4525   bzw. eine beliebige Summe dieser Werte:
4526   AlleAus=0, CapsLock+NumLock=6, etc.
4527   
4528   Der folgende Code wurde �bernommen von:
4529   http://www.autohotkey.com/forum/viewtopic.php?t=10532
4530   
4531   Um eventuelle Wechselwirkungen mit dem bestehenden
4532   Code (insb. der Unicode-Konvertierung) auszuschie�en,
4533   sind auch alle (Hilfsmethoden) mit dem Postfix LED
4534   versehen worden.
4535   ------------------------------------------------------
4536*/
4537
4538KeyboardLED(LEDvalue, Cmd)  ; LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4 ; Cmd = on/off/switch
4539{
4540  Static h_device
4541  If ! h_device ; initialise
4542    {
4543    device =\Device\KeyBoardClass0
4544    SetUnicodeStrLED(fn,device)
4545    h_device:=NtCreateFileLED(fn,0+0x00000100+0x00000080+0x00100000,1,1,0x00000040+0x00000020,0)
4546    }
4547
4548  VarSetCapacity( output_actual, 4, 0 )
4549  input_size = 4
4550  VarSetCapacity( input, input_size, 0 )
4551
4552  If Cmd= switch  ;switches every LED according to LEDvalue
4553   KeyLED:= LEDvalue
4554  If Cmd= on  ;forces all choosen LED's to ON (LEDvalue= 0 ->LED's according to keystate)
4555   KeyLED:= LEDvalue | (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
4556  If Cmd= off  ;forces all choosen LED's to OFF (LEDvalue= 0 ->LED's according to keystate)
4557    {
4558    LEDvalue:= LEDvalue ^ 7
4559    KeyLED:= LEDvalue & (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
4560    }
4561  ; EncodeIntegerLED( KeyLED, 1, &input, 2 ) ;input bit pattern (KeyLED): bit 0 = scrolllock ;bit 1 = numlock ;bit 2 = capslock
4562  input := Chr(1) Chr(1) Chr(KeyLED)
4563  input := Chr(1)
4564  input=
4565  success := DllCall( "DeviceIoControl"
4566              , "uint", h_device
4567              , "uint", CTL_CODE_LED( 0x0000000b     ; FILE_DEVICE_KEYBOARD
4568                        , 2
4569                        , 0             ; METHOD_BUFFERED
4570                        , 0  )          ; FILE_ANY_ACCESS
4571              , "uint", &input
4572              , "uint", input_size
4573              , "uint", 0
4574              , "uint", 0
4575              , "uint", &output_actual
4576              , "uint", 0 )
4577}
4578
4579CTL_CODE_LED( p_device_type, p_function, p_method, p_access )
4580{
4581  Return, ( p_device_type << 16 ) | ( p_access << 14 ) | ( p_function << 2 ) | p_method
4582}
4583
4584
4585NtCreateFileLED(ByRef wfilename,desiredaccess,sharemode,createdist,flags,fattribs)
4586{
4587  VarSetCapacity(fh,4,0)
4588  VarSetCapacity(objattrib,24,0)
4589  VarSetCapacity(io,8,0)
4590  VarSetCapacity(pus,8)
4591  uslen:=DllCall("lstrlenW","str",wfilename)*2
4592  InsertIntegerLED(uslen,pus,0,2)
4593  InsertIntegerLED(uslen,pus,2,2)
4594  InsertIntegerLED(&wfilename,pus,4)
4595  InsertIntegerLED(24,objattrib,0)
4596  InsertIntegerLED(&pus,objattrib,8)
4597  status:=DllCall("ntdll\ZwCreateFile","str",fh,"UInt",desiredaccess,"str",objattrib,"str",io,"UInt",0,"UInt",fattribs
4598                  ,"UInt",sharemode,"UInt",createdist,"UInt",flags,"UInt",0,"UInt",0, "UInt")
4599  return ExtractIntegerLED(fh)
4600}
4601
4602
4603SetUnicodeStrLED(ByRef out, str_)
4604{
4605  VarSetCapacity(st1, 8, 0)
4606  InsertIntegerLED(0x530025, st1)
4607  VarSetCapacity(out, (StrLen(str_)+1)*2, 0)
4608  DllCall("wsprintfW", "str", out, "str", st1, "str", str_, "Cdecl UInt")
4609}
4610
4611
4612ExtractIntegerLED(ByRef pSource, pOffset = 0, pIsSigned = false, pSize = 4)
4613; pSource is a string (buffer) whose memory area contains a raw/binary integer at pOffset.
4614; The caller should pass true for pSigned to interpret the result as signed vs. unsigned.
4615; pSize is the size of PSource's integer in bytes (e.g. 4 bytes for a DWORD or Int).
4616; pSource must be ByRef to avoid corruption during the formal-to-actual copying process
4617; (since pSource might contain valid data beyond its first binary zero).
4618{
4619  Loop %pSize%  ; Build the integer by adding up its bytes.
4620    result += *(&pSource + pOffset + A_Index-1) << 8*(A_Index-1)
4621  if (!pIsSigned OR pSize > 4 OR result < 0x80000000)
4622    return result  ; Signed vs. unsigned doesn't matter in these cases.
4623  ; Otherwise, convert the value (now known to be 32-bit) to its signed counterpart:
4624  return -(0xFFFFFFFF - result + 1)
4625}
4626
4627
4628InsertIntegerLED(pInteger, ByRef pDest, pOffset = 0, pSize = 4)
4629; The caller must ensure that pDest has sufficient capacity.  To preserve any existing contents in pDest,
4630; only pSize number of bytes starting at pOffset are altered in it.
4631{
4632  Loop %pSize%  ; Copy each byte in the integer into the structure as raw binary data.
4633    DllCall("RtlFillMemory", "UInt", &pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
4634}
4635
4636
4637
4638
4639/*
4640   ------------------------------------------------------
4641   Funktionen
4642   ------------------------------------------------------
4643*/
4644
4645/*
4646Ebenen laut Referenz:
46471. Ebene (kein Mod)      4. Ebene (Mod4)
46482. Ebene (Umschalt)      5. Ebene (Umschalt+Mod3)
46493. Ebene (Mod3)          6. Ebene (Mod3+Mod4)
4650*/
4651
4652EbeneAktualisieren()
4653{
4654   global
4655   if (ahkTreiberKombi)
4656   {
4657      if ( IsMod4Pressed() and not(IsShiftPressed()) and not(IsMod3Pressed()))
4658      {
4659         Ebene = 6     
4660      }
4661      else
4662      {
4663        Ebene = -1
4664      } 
4665   }
4666   else
4667   {   
4668     if ( IsShiftPressed() )
4669     {  ; Umschalt
4670        if ( IsMod3Pressed() )
4671            { ; Umschalt UND Mod3
4672            if ( IsMod4Pressed() )
4673            {  ; Umschalt UND Mod3 UND Mod4
4674               ; Ebene 8 impliziert Ebene 6
4675               Ebene = 6
4676             }
4677            else
4678            { ; Umschald UND Mod3 NICHT Mod4
4679                Ebene = 5                 
4680            }
4681        }
4682        else
4683        {  ; Umschalt NICHT Mod3
4684            if ( IsMod4Pressed() )
4685            {  ; Umschalt UND Mod4 NICHT Mod3
4686               ; Ebene 7 impliziert Ebene 4
4687                Ebene = 4
4688            }
4689            else
4690            { ; Umschalt NICHT Mod3 NICHT Mod4
4691               Ebene = 2   
4692            }
4693         }   
4694     }
4695     else
4696     { ; NICHT Umschalt
4697        if ( IsMod3Pressed() )
4698        { ; Mod3 NICHT Umschalt
4699           if ( IsMod4Pressed() )
4700           {  ; Mod3 UND Mod4 NICHT Umschalt
4701               Ebene = 6
4702           }
4703           else
4704           { ; Mod3 NICHT Mod4 NICHT Umschalt
4705               Ebene = 3   
4706           }
4707        }
4708        else
4709        {  ; NICHT Umschalt NICHT Mod3
4710           if ( IsMod4Pressed() )
4711           {  ; Mod4 NICHT Umschalt NICHT Mod3
4712               Ebene = 4
4713           }
4714           else
4715           { ; NICHT Umschalt NICHT Mod3 NICHT Mod4
4716               Ebene = 1
4717           }
4718        }   
4719      }
4720   }
4721}
4722
4723
4724
4725IsShiftPressed()
4726{
4727  return GetKeyState("Shift","P")
4728}
4729
4730IsMod3Pressed()
4731{
4732   global
4733   if (IsMod3Locked)
4734   {
4735       return (not ( GetKeyState("CapsLock","P") or GetKeyState("#","P") ))  ; # = SC02B
4736   }
4737   else {
4738      return ( GetKeyState("CapsLock","P") or GetKeyState("#","P") )  ; # = SC02B
4739   }
4740}
4741
4742IsMod4Pressed()
4743{
4744   global
4745   if( not(einHandNeo) or not(spacepressed) )
4746   {
4747     if (IsMod4Locked)
4748     {
4749         return (not ( GetKeyState("<","P") or GetKeyState("SC138","P") or altGrPressed ))
4750     }
4751     else {
4752         return ( GetKeyState("<","P") or GetKeyState("SC138","P") or altGrPressed )
4753     }
4754   }
4755   else
4756   {
4757     if (IsMod4Locked)
4758     {
4759         return (not ( GetKeyState("<","P") or GetKeyState("SC138","P") or GetKeyState("�","P")  or altGrPressed ))
4760     }
4761     else {
4762         return ( GetKeyState("<","P") or GetKeyState("SC138","P") or GetKeyState("�","P") or altGrPressed )
4763     }
4764   }
4765   
4766}
4767
4768
4769/*************************
4770  Alte Methoden
4771*************************/
4772
4773/*
4774Unicode(code)
4775{
4776   saved_clipboard := ClipboardAll
4777   Transform, Clipboard, Unicode, %code%
4778   sendplay ^v
4779   Clipboard := saved_clipboard
4780}
4781
4782BSUnicode(code)
4783{
4784   saved_clipboard := ClipboardAll
4785   Transform, Clipboard, Unicode, %code%
4786   sendplay {bs}^v
4787   Clipboard := saved_clipboard
4788}
4789*/
4790
4791IsModifierPressed()
4792{
4793   if (GetKeyState("LControl","P") or GetKeyState("RControl","P") or GetKeyState("LAlt","P") or GetKeyState("RAltl","P") or GetKeyState("LWin","P") or GetKeyState("RWin","P") or GetKeyState("LShift","P") or GetKeyState("RShift","P") or GetKeyState("AltGr","P") )
4794    {
4795       return 1
4796    }
4797    else
4798    {
4799       return 0
4800    }
4801}
4802
4803SendUnicodeChar(charCode)
4804{
4805   VarSetCapacity(ki, 28 * 2, 0)
4806
4807   EncodeInteger(&ki + 0, 1)
4808   EncodeInteger(&ki + 6, charCode)
4809   EncodeInteger(&ki + 8, 4)
4810   EncodeInteger(&ki +28, 1)
4811   EncodeInteger(&ki +34, charCode)
4812   EncodeInteger(&ki +36, 4|2)
4813
4814   DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
4815}
4816
4817BSSendUnicodeChar(charCode)
4818{
4819   send {bs}
4820   SendUnicodeChar(charCode)
4821}
4822
4823CompUnicodeChar(charCode)
4824{
4825   send {bs}
4826     SendUnicodeChar(charCode)
4827}
4828
4829Comp3UnicodeChar(charCode)
4830{
4831   send {bs}
4832   send {bs}
4833   SendUnicodeChar(charCode)
4834}
4835
4836
4837EncodeInteger(ref, val)
4838{
4839   DllCall("ntdll\RtlFillMemoryUlong", "Uint", ref, "Uint", 4, "Uint", val)
4840}
4841
4842
4843;Lang-s-Tastatur:
4844{
4845SC056 & *Esc::
4846LangSTastatur := not(LangSTastatur) ; schaltet die Lang-s-Tastatur ein und aus
4847;if (LangSTastatur) SoundBeep ;auskommentieren, um Warnton zu erzeugen
4848return
4849}
4850
4851
4852/*
4853   ------------------------------------------------------
4854   BildschirmTastatur
4855   ------------------------------------------------------
4856*/
4857guiErstellt = 0
4858alwaysOnTop = 1
4859aktuellesBild = ebene1.png
4860SC056 & *F1::
4861SC138 & *F1::
4862{
4863  if (zeigeBildschirmTastatur)
4864    goto Switch1
4865  return
4866}
4867SC056 & *F2::
4868SC138 & *F2::
4869{
4870  if (zeigeBildschirmTastatur)
4871    goto Switch2
4872  return
4873}
4874SC056 & *F3::
4875SC138 & *F3::
4876{
4877  if (zeigeBildschirmTastatur)
4878    goto Switch3
4879  return
4880}
4881SC056 & *F4::
4882SC138 & *F4::
4883{
4884  if (zeigeBildschirmTastatur)
4885    goto Switch4
4886  return
4887}
4888SC056 & *F5::
4889SC138 & *F5::
4890{
4891  if (zeigeBildschirmTastatur)
4892    goto Switch5
4893  return
4894}
4895SC056 & *F6::
4896SC138 & *F6::
4897{
4898  if (zeigeBildschirmTastatur)
4899    goto Switch6
4900  return
4901}
4902SC056 & *F7::
4903SC138 & *F7::
4904{
4905  if (zeigeBildschirmTastatur)
4906    goto Show
4907  return
4908}
4909SC056 & *F8::
4910SC138 & *F8::
4911{
4912  if (zeigeBildschirmTastatur)
4913    goto ToggleAlwaysOnTop
4914  return
4915}
4916Switch1:
4917  if (guiErstellt)
4918  {
4919     if (Image == "ebene1.png")
4920        goto Close
4921     else
4922     {
4923       Image = ebene1.png
4924       SetTimer, Refresh
4925     }
4926  }
4927  else
4928  {
4929    Image = ebene1.png
4930    goto Show   
4931  }
4932Return
4933
4934Switch2:
4935  if (guiErstellt)
4936  {
4937     if (Image == "ebene2.png")
4938        goto Close
4939     else
4940     {
4941       Image = ebene2.png
4942       SetTimer, Refresh
4943     }
4944  }
4945  else
4946  {
4947    Image = ebene2.png
4948    goto Show   
4949  }
4950Return
4951
4952Switch3:
4953  if (guiErstellt)
4954  {
4955     if (Image == "ebene3.png")
4956        goto Close
4957     else
4958     {
4959       Image = ebene3.png
4960       SetTimer, Refresh
4961     }
4962  }
4963  else
4964  {
4965    Image = ebene3.png
4966    goto Show   
4967  }
4968Return
4969
4970Switch4:
4971  if (guiErstellt)
4972  {
4973     if (Image == "ebene4.png")
4974        goto Close
4975     else
4976     {
4977       Image = ebene4.png
4978       SetTimer, Refresh
4979     }
4980  }
4981  else
4982  {
4983    Image = ebene4.png
4984    goto Show   
4985  }
4986Return
4987
4988Switch5:
4989  if (guiErstellt)
4990  {
4991     if (Image == "ebene5.png")
4992        goto Close
4993     else
4994     {
4995       Image = ebene5.png
4996       SetTimer, Refresh
4997     }
4998  }
4999  else
5000  {
5001    Image = ebene5.png
5002    goto Show   
5003  }
5004Return
5005
5006Switch6:
5007  if (guiErstellt)
5008  {
5009     if (Image == "ebene6.png")
5010        goto Close
5011     else
5012     {
5013       Image = ebene6.png
5014       SetTimer, Refresh
5015     }
5016  }
5017  else
5018  {
5019    Image = ebene6.png
5020    goto Show   
5021  }
5022Return
5023
5024Show:
5025  if (guiErstellt)
5026  {
5027     goto Close
5028  }
5029  else
5030  {
5031    if (Image = "")
5032    {
5033      Image = ebene1.png
5034    }     
5035    yPosition := A_ScreenHeight -270
5036    Gui, Color, FFFFFF
5037    Gui, Add, Button, xm+5 gSwitch1, F1
5038    Gui, Add, Text, x+5, kleine Buchstaben
5039    Gui, Add, Button, xm+5 gSwitch2, F2
5040    Gui, Add, Text, x+5, gro�e Buchstaben
5041    Gui, Add, Button, xm+5 gSwitch3, F3
5042    Gui, Add, Text, x+5, Satz-/Sonderzeichen
5043    Gui, Add, Button, xm+5 gSwitch4, F4
5044    Gui, Add, Text, x+5, Zahlen / Steuerung
5045    Gui, Add, Button, xm+5 gSwitch5, F5
5046    Gui, Add, Text, x+5, Sprachen
5047    Gui, Add, Button, xm+5 gSwitch6, F6
5048    Gui, Add, Text, x+5, Mathesymbole
5049    Gui, Add, Button, xm+5 gShow, F7
5050    Gui, Add, Text, x+5, An /
5051    Gui, Add, Text, y+3, Aus
5052    Gui, Add, Button, x+10 y+-30 gShow, F8
5053    Gui, Add, Text, x+5, OnTop
5054    Gui, Add, Picture,AltSubmit ys w564 h200 vPicture, %Image%
5055    Gui, +AlwaysOnTop
5056    Gui, Show, y%yposition% Autosize
5057    SetTimer, Refresh
5058    guiErstellt = 1
5059  }
5060Return
5061
5062Close:
5063  guiErstellt = 0
5064  Gui, Destroy
5065Return
5066
5067Refresh:
5068   If (Image != OldImage)
5069   {
5070      GuiControl, , Picture, %Image%
5071      OldImage := Image
5072   }
5073Return
5074
5075ToggleAlwaysOnTop:
5076    if (alwaysOnTop)
5077    {
5078      Gui, -AlwaysOnTop
5079      alwaysOnTop = 0   
5080    }
5081    else
5082    {
5083      Gui, +AlwaysOnTop
5084      alwaysOnTop = 1
5085    }
5086Return
5087 ; Ende der BildschirmTastatur
5088
5089
5090/*
5091   ------------------------------------------------------
5092   Shift+Pause "pausiert" das Script.
5093   ------------------------------------------------------
5094*/
5095
5096+pause::
5097Suspend, Permit
5098   goto togglesuspend
5099return
5100
5101; ------------------------------------
5102
5103^SC034::einHandNeo := not(einHandNeo)  ; Punkt
5104^SC033::lernModus := not(lernModus)    ; Komma
5105
5106
5107
5108togglesuspend:
5109   if A_IsSuspended
5110   {
5111      menu, tray, rename, %enable%, %disable%
5112      menu, tray, tip, %name%
5113      if (iconBenutzen)
5114          menu, tray, icon, neo.ico,,1 
5115      suspend , off ; Schaltet Suspend aus -> NEO
5116   }
5117   else
5118   {
5119      menu, tray, rename, %disable%, %enable%
5120      menu, tray, tip, %name% : Deaktiviert
5121      if (iconBenutzen)
5122         menu, tray, icon, neo_disabled.ico,,1
5123      suspend , on  ; Schaltet Suspend ein -> QWERTZ
5124   }
5125
5126return
5127
5128
5129help:
5130   Run, %A_WinDir%\hh mk:@MSITStore:autohotkey.chm
5131return
5132
5133
5134about:
5135   msgbox, 64, %name% � Ergonomische Tastaturbelegung,
5136   (
5137   %name%
5138   `nDas Neo-Layout ersetzt das �bliche deutsche
5139   Tastaturlayout mit der Alternative Neo,
5140   beschrieben auf http://neo-layout.org/.
5141   `nDazu sind keine Administratorrechte n�tig.
5142   `nWenn Autohotkey aktiviert ist, werden alle Tastendrucke
5143   abgefangen und statt dessen eine �bersetzung weitergeschickt.
5144   `nDies geschieht transparent f�r den Anwender,
5145   es muss nichts installiert werden.
5146   `nDie Zeichen�bersetzung kann leicht �ber das Icon im
5147   Systemtray deaktiviert werden.  `n
5148   )
5149return
5150
5151
5152neo:
5153   run http://neo-layout.org/
5154return
5155
5156autohotkey:
5157   run http://autohotkey.com/
5158return
5159
5160open:
5161   ListLines ; shows the Autohotkey window
5162return
5163
5164edit:
5165   edit
5166return
5167
5168reload:
5169   Reload
5170return
5171
5172hide:
5173   menu, tray, noicon
5174return
5175
5176exitprogram:
5177   exitapp
5178return
5179
5180
5181
5182
5183
5184
Note: See TracBrowser for help on using the browser.