root/windows/autohotkey/neo20.ahk @ 777

Revision 777, 77.0 KB (checked in by martin_r, 5 years ago)

Syntaxfehler korrigiert.

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