Changeset 72

Show
Ignore:
Timestamp:
04/16/07 22:43:51 (6 years ago)
Author:
erik
Message:

neue version von neo-autohotkey

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • windows/XP/autohotkey/neo20.ahk

    r70 r72  
    1 ;; 
    2 ;; NoAdmin-NEO -- Simon Griph, 2004 
    3 ;; 
     1/* 
     2   NEO-Layout 
     3   nach NoAdmin-Svorak von Simon Griph, 2004 
     4   3./4. Ebene funktioniert nur �ber AltGr, nicht �ber CapsLock 
     5   5./6. Ebene noch gar nicht 
     6*/ 
    47 
    58;#InstallKeybdHook 
    6 #singleinstance force 
    7 #persistent 
    8 #notrayicon 
     9;#singleinstance force 
     10;#notrayicon 
    911#hotkeyinterval 1024 
    1012#maxhotkeysperinterval 64 
    11 setstorecapslockmode, off 
    12  
    13 name    = NEO-Layout 
     13setstorecapslockmode, on 
     14 
     15name    = &NEO-Layout 
    1416enable  = Aktiviere &NEO 
    1517disable = Deaktiviere &NEO 
    16 ctrls   = &Strg Standard         
     18;ctrls   = &Strg Standard        
    1719 
    1820regread, inputlocale, HKEY_CURRENT_USER, Keyboard Layout\Preload, 1 
    19 regread, inputlocalealias, HKEY_CURRENT_USER, Keyboard Layout\Substitutes, inputlocale 
     21regread, inputlocalealias, HKEY_CURRENT_USER, Keyboard Layout\Substitutes, %inputlocale% 
    2022if inputlocalealias <> 
    21    inputlocale = inputlocalealias 
     23   inputlocale = %inputlocalealias% 
    2224if inputlocale <> 00000407 
    2325{ 
    2426   suspend    
    25    regread, inputlocale, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\Keyboard Layouts\inputlocale, Layout Text 
    26    msgbox, 48, Warning!, Incompatible keybord layout:   `n`n      "inputlocale"   `n`nGerman QWERTZ has to be the standardlayout for   `nname works as expected.   `n`nChange the standard layout under control panel   `n-> Local and language settings   `n-> Language -> Information...   `n 
     27   regread, inputlocale, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%, Layout Text 
     28   msgbox, 48, Warning!, Incompatible keybord layout:   `n`n      "inputlocale"   `n`nGerman QWERTZ has to be the standardlayout for   `n%name% works as expected.   `n`nChange the standard layout under control panel   `n-> Local and language settings   `n-> Language -> Information...   `n 
    2729   exitapp 
    2830} 
    2931 
    3032stringtrimright, inifile, a_scriptname, 4 
    31 inifile = inifile.ini 
    32 iniread, firstrun, inifile, environment, firstRun, on 
     33inifile = %inifile%.ini 
     34iniread, firstrun, %inifile%, environment, firstRun, on 
    3335if firstrun <> off 
    3436{ 
    35    iniwrite, off, inifile, environment, firstRun 
     37   iniwrite, off, %inifile%, environment, firstRun 
    3638   gosub help 
    3739} 
    3840 
    39 menu, tray, nostandard 
    40 menu, tray, add, disable, toggleneo 
    41 menu, tray, default, disable 
    42 ;menu, tray, add, ctrls, togglectrl 
     41;menu, tray, nostandard 
     42menu, tray, add 
     43menu, tray, add, %disable%, toggleneo 
     44menu, tray, default, %disable% 
     45;menu, tray, add, %ctrls%, togglectrl 
    4346   menu, helpmenu, add, &Hilfe, help 
    4447   menu, helpmenu, add 
    4548   menu, helpmenu, add, http://&autohotkey.com/, autohotkey 
    4649   menu, helpmenu, add, http://www.eigenheimstrasse.de:8668/space/Computerecke/NEO-Tastaturlayout, neo 
    47    menu, helpmenu, add, http://aoeu.&info/, aoeu 
     50   ;menu, helpmenu, add, http://aoeu.&info/, aoeu 
    4851menu, tray, add, &Dokumentation, :helpmenu 
    4952menu, tray, add 
    5053menu, tray, add, Nicht &im &Systray &anzeigen, hide 
    51 menu, tray, add, NEO beenden, exitprogram 
    52 menu, tray, tip, NEO 
    53  
    54 iniread, scc, inifile, environment, neoCtrlChars, on 
    55 ;gosub, setctrl 
     54menu, tray, add, %name% beenden, exitprogram 
     55menu, tray, tip, %name% 
     56 
     57/* 
     58iniread, scc, %inifile%, environment, neoCtrlChars, on 
     59gosub, setctrl 
    5660menu, tray, icon 
    5761blockinput, send 
     62*/ 
     63 
     64/* 
     65;Senden von Unicode: 
     66Hotkey:: 
     67MyUTF_String = {ASC xy} 
     68Gosub Unicode 
     69return 
     70*/ 
     71 
     72 
     73; F�r 3. und 4. Ebene: 
     74; nach http://www.autohotkey.com/forum/topic5370.html 
     75; CapsLock und # werden zu AltGr: 
     76; [this didn't work: *CapsLock::Send {LCtrl} ] 
     77 
     78*CapsLock:: 
     79*SC02B:: 
     80Send {RAlt Down} 
     81Send {LControl Down} 
     82return 
     83 
     84*CapsLock Up:: 
     85*SC02B Up:: 
     86Send {RAlt Up}  
     87Send {LControl Up}  
     88return 
     89 
     90; F�r 5. und 6. Ebene: 
     91; < und AltGr werden zu LCtrl + RCtrl: 
     92/* 
     93*SC056:: 
     94*SC138:: 
     95Send {LControl Down} 
     96Send {RControl Down} 
     97return 
     98 
     99*SC056 Up:: 
     100*SC138 Up:: 
     101Send {LControl Up}  
     102Send {RControl Up}  
     103return 
     104*/ 
    58105 
    59106#usehook on 
     
    62109;--------- 
    63110 
    64 SC029::send {^} ; 
     111SC029::send {^} ;tot 
    651121::send 1 
    661132::send 2 
     
    731209::send 9 
    741210::send 0 
    75 �::send - 
    76 SC00D::send {�} ; 
     122�::send - ; Bind, Unicode? 
     123SC00D::send {�} ;tot 
    77124 
    78125q::send x 
     
    87134p::send q 
    88135�::send � 
    89 SC01B::send {~} ; 
     136SC01B::send {~} ;soll tot, ist aber nicht -> extra definieren? 
    90137 
    91138a::send u 
     
    100147�::send d 
    101148�::send y 
    102 ;SC02B (#) wird zu Mod5 
    103  
     149;SC02B (#) wird zu AltGr 
     150 
     151;SC056 (<) wird zu Mod5 
    104152y::send � 
    105153x::send � 
     
    109157n::send b 
    110158m::send m 
    111 SC033::send {,} 
     159SC033::send `, 
    112160SC034::send . 
    113161SC035::send j 
     
    116164;--------- 
    117165 
    118 +SC029::send {^} ; 
    119 +1::send � ; 
    120 +2::send 2 ; 
     166+SC029::  ;?  
     167; 030C passiert bei mir nichts - 02C7 w�re untot, geht auch nicht 
     168MyUTF_String = {ASC 2C7}  
     169Gosub Unicode 
     170return 
     171 
     172+1::send � 
     173+2::send 2  
    121174+3::send � 
    122175+4::send $ 
    123176+5::send � 
    124177+6::send � 
    125 +7::send � ; 
     178+7::send � ; wo ist Unterschied zu +1? 
    126179+8::send � 
    127180+9::send � 
    128181+0::send � 
    129 +�::send �  
    130 +SC00D::send {�} ; 
     182+�::send � ; Ged, Unicode? 
     183+SC00D::send ``  
    131184 
    132185+q::send X 
     
    141194+p::send Q 
    142195+�::send � 
    143 +SC01B::send - ; 
     196 
     197+SC01B::  ; Macron?? sollte tot sein... 
     198MyUTF_String = {ASC 0175}  
     199Gosub Unicode 
     200return 
    144201 
    145202+a::send U 
     
    154211+�::send D 
    155212+�::send Y 
    156 ;+SC02B::send {#}  
     213;SC02B (#) wird zu AltGr 
    157214 
    158215+y::send � 
     
    163220+n::send B 
    164221+m::send M 
    165 +SC033::send {;} 
     222+SC033::send `; 
    166223+SC034::send : 
    167224+SC035::send J 
     
    169226;3. Ebene (AltGr) 
    170227;--------- 
    171 <^>!SC029::send ? ; 
    172 <^>!1::send � 
    173 <^>!2::send ^ 
    174 <^>!3::send 3 
    175 <^>!4::send � 
    176 <^>!5::send � 
    177 <^>!6::send � 
    178 <^>!7::send � 
     228 
     229<^>!SC029::send ? ; Siehe 2. Ebene 
     230<^>!1:: ; � 
     231MyUTF_String = {ASC 172}  
     232Gosub Unicode 
     233return 
     234 
     235<^>!2::send ^  ; 
     236<^>!3::send 3 ; 
     237<^>!4::send � ; 
     238<^>!5::send � ;  
     239<^>!6::send � ; 
     240<^>!7::send � ; 
    179241<^>!8::send � 
    180242<^>!9::send � 
    181243<^>!0::send � 
    182 <^>!�::send � 
     244<^>!�::send � ; soll ganz langer Strich sein 
    183245<^>!SC00D::send � ; 
    184246 
    185 <^>!q::send @ 
     247<^>!q::send @  
    186248<^>!w::send _ 
    187249<^>!e::send [ 
     
    189251<^>!t::send {^} 
    190252<^>!z::send {!} 
    191 <^>!u::send {<} 
    192 <^>!i::send {>} 
    193 <^>!o::send = 
    194 <^>!p::send {;} 
    195 <^>!�::send ? 
     253<^>!u::send < 
     254<^>!i::send > 
     255<^>!o::send `= 
     256<^>!p::send `; 
     257<^>!�::send ? ; 
    196258<^>!SC01B::send ? ; 
    197259 
    198260<^>!a::send \ 
    199261<^>!s::send / 
    200 <^>!d::send { 
    201 <^>!f::send } 
     262<^>!d::sendraw {  
     263<^>!f::sendraw }  
    202264<^>!g::send * 
    203265<^>!h::send ? 
     
    207269<^>!�::send : 
    208270<^>!�::send y 
    209 ;SC02B (#) wird zu Mod5 
     271;SC02B (#) wird zu AltGr 
    210272 
    211273<^>!y::send ~ 
     
    213275<^>!c::send | 
    214276<^>!v::send {#} 
    215 <^>!b::send {`} 
     277<^>!b::send `` ; tot, soll der untot sein? 
    216278<^>!n::send {+} 
    217 <^>!m::send 0/0 ; 
     279<^>!m::send `%  
    218280<^>!SC033::send {&} 
    219281<^>!SC034::send " 
     
    225287 
    226288<^>!+SC029::send � ; 
    227 <^>!+1::send � 
     289<^>!+1::send � ; 
    228290<^>!+2::send � 
    229291<^>!+3::send � 
    230 <^>!+4::send � 
    231 <^>!+5::send � 
    232 <^>!+6::send � 
    233 <^>!+7::send � 
    234 <^>!+8::send � 
    235 <^>!+9::send � 
    236 <^>!+0::send � 
    237 <^>!+�::send � 
     292<^>!+4::send � ; 
     293<^>!+5::send � ; 
     294<^>!+6::send � ; 
     295<^>!+7::send � ; 
     296<^>!+8::send � ; 
     297<^>!+9::send � ; 
     298<^>!+0::send � ; 
     299<^>!+�::send � ; 
    238300<^>!+SC00D::send � ; 
    239301 
     
    262324<^>!+�::send ? 
    263325<^>!+�::send ? 
    264 ;SC02B (#) wird zu Mod5 
     326;SC02B (#) wird zu AltGr 
    265327 
    266328<^>!+y::send � 
     
    278340;--------- 
    279341 
    280 SC02B & a:: 
    281 CapsLock & a:: 
    282 send Pos1 
    283 return 
    284  
     342<>^4::Send 5 
     343 
     344;SC056 & 8:: 
     345;RAlt & 8:: 
     346;Send {/} 
     347;return 
     348 
     349;SC056 & 9:: 
     350;RAlt & 9:: 
     351;Send {*} 
     352;return 
     353 
     354;SC056 & 0:: 
     355;RAlt & 0:: 
     356;Send {-} 
     357;return 
     358 
     359 
     360;SC056 & q:: 
     361;RAlt & q:: 
     362;Send {Esc} 
     363;return 
     364 
     365;SC056 & w:: 
     366;RAlt & w:: 
     367;Send {Backspace} 
     368;return 
     369 
     370;SC056 & e:: 
     371;RAlt & e:: 
     372;Send {Up} 
     373;return 
     374 
     375;SC056 & t:: 
     376;RAlt & t:: 
     377;Send {Insert} 
     378;return 
     379 
     380;SC056 & z:: 
     381;RAlt & z:: 
     382;Send {�} 
     383;return 
     384 
     385;SC056 & u:: 
     386;RAlt & u:: 
     387;Send {7} 
     388;return 
     389 
     390;SC056 & i:: 
     391;RAlt & i:: 
     392;Send {8} 
     393;return 
     394 
     395;SC056 & o:: 
     396;RAlt & o:: 
     397;Send {9} 
     398;return 
     399 
     400;SC056 & p:: 
     401;RAlt & p:: 
     402;Send {+} 
     403;return 
     404; 
     405;SC056 & �:: 
     406;RAlt & �:: 
     407;Send {?} 
     408;return 
     409 
     410 
     411;SC056 & a:: 
     412;RAlt & a:: 
     413;Send {Home} 
     414;return 
     415 
     416;SC056 & s:: 
     417;RAlt & s:: 
     418;Send {Left} 
     419;return 
     420 
     421;SC056 & d:: 
     422;RAlt & d:: 
     423;Send {Down} 
     424;return 
     425 
     426;SC056 & f:: 
     427;RAlt & f:: 
     428;Send {Right} 
     429;return 
     430 
     431;SC056 & g:: 
     432;RAlt & g:: 
     433;Send {End} 
     434;return 
     435 
     436;SC056 & h:: 
     437;RAlt & h:: 
     438;Send {�} 
     439;return 
     440 
     441;SC056 & j:: 
     442;RAlt & j:: 
     443;Send {4} 
     444;return 
     445 
     446;SC056 & k:: 
     447;RAlt & k:: 
     448;Send {5} 
     449;return 
     450 
     451;SC056 & l:: 
     452;RAlt & l:: 
     453;Send {6} 
     454;return 
     455 
     456;SC056 & �:: 
     457;RAlt & �:: 
     458;Send {,} 
     459;return 
     460 
     461;SC056 & �:: 
     462;RAlt & �:: 
     463;Send {�} 
     464;return 
     465 
     466;SC056 & y:: 
     467;RAlt & y:: 
     468;Send {Tab} 
     469;return 
     470 
     471;SC056 & x:: 
     472;RAlt & x:: 
     473;Send {Del} 
     474;return 
     475 
     476;SC056 & c:: 
     477;RAlt & c:: 
     478;Send {PgDn} 
     479;return 
     480 
     481;SC056 & n:: 
     482;RAlt & n:: 
     483;Send {�} 
     484;return 
     485 
     486;SC056 & m:: 
     487;RAlt & m:: 
     488;Send {1} 
     489;return 
     490 
     491;SC056 & SC033:: 
     492;RAlt & SC033:: 
     493;Send {2} 
     494;return 
     495 
     496;SC056 & SC034:: 
     497;RAlt & SC034:: 
     498;Send {3} 
     499;return 
     500 
     501;SC056 & SC035:: 
     502;RAlt & SC035:: 
     503;Send {.} 
     504;return 
     505 
     506;6. Ebene (Mod5 & Shift) 
     507;----------------------- 
     508 
     509;+SC056 & b:: 
     510;+RAlt & b:: 
     511;Send m 
     512;return 
    285513 
    286514 
     
    326554^�::send ^d 
    327555^�::send ^y 
    328 ;SC02B (#) wird zu Mod5 
     556;SC02B (#) wird zu AltGr 
    329557 
    330558^y::send ^� 
     
    380608!�::send {altdown}d 
    381609!�::send {altdown}y 
    382 ;SC02B (#) wird zu Mod5 
     610;SC02B (#) wird zu AltGr 
    383611 
    384612!y::send {altdown}� 
     
    434662#�::send #d 
    435663#�::send #y 
    436 ;SC02B (#) wird zu Mod5 
     664;SC02B (#) wird zu AltGr 
    437665 
    438666#y::send #� 
     
    488716^+�::send ^+d 
    489717^+�::send ^+y 
    490 ;SC02B (#) wird zu Mod5 
     718;SC02B (#) wird zu AltGr 
    491719 
    492720^+y::send ^+� 
     
    508736return 
    509737 
     738Unicode: 
     739; Place Unicode text onto the clipboard: 
     740Transform, Clipboard, Unicode, %MyUTF_String%   
     741; Retrieve the clipboard's Unicode text as a UTF-8 string: 
     742Transform, OutputVar, Unicode   
     743Send %OutputVar% 
     744return 
     745 
    510746toggleneo: 
    511747   if state <> 
    512748   { 
    513749      state = 
    514       menu, tray, rename, enable, disable 
    515       menu, tray, enable, ctrls 
     750      menu, tray, rename, %enable%, %disable% 
     751      menu, tray, enable, %ctrls% 
    516752   } 
    517753   else 
    518754   { 
    519755      state = : Inaktiverad 
    520       menu, tray, rename, disable, enable 
    521       menu, tray, disable, ctrls 
     756      menu, tray, rename, %disable%, %enable% 
     757      menu, tray, disable, %ctrls% 
    522758   } 
    523759 
    524    menu, tray, tip, namestate 
     760   menu, tray, tip, %name%%state% 
    525761   suspend 
    526762return 
     
    531767   else 
    532768      scc = on 
    533    iniwrite, scc, inifile, environment, neoCtrlChars 
    534 ;   gosub, setctrl 
     769   iniwrite, %scc%, %inifile%, environment, svorakCtrlChars 
     770   gosub, setctrl 
     771return 
     772 
     773setctrl: 
     774   if scc <> off 
     775      menu, tray, uncheck, %ctrls% 
     776   else 
     777      menu, tray, check, %ctrls% 
    535778return 
    536779 
    537780 
    538781help: 
    539    msgbox, 64, name, NEO-Layout ohne Administratorrechte.   `n`nname ersetzt das �bliche deutsche   `nTastaturlayout mit der Alternative NEO,   `nbeschrieben auf http://www.de.   `n`nWenn Autohotkey aktiviert ist, werden alle Tastendrucke `nabgefangen und statt dessen eine �bersetzung weitergeschickt. `nDies geschieht transparent f�r den Anwender,  `nes muss nichts installiert werden.   `n`nDie Zeichen�bersetzung kann leicht �ber ein Icon im `nSystemtray deaktiviert werden.  `nAu�erdem kann dort ausgew�hlt werden, ob die Strg-Tasten `nebenfalls �bersetzt werden sollen. `n`n`nSimon Griph, 2004-10-25   `n 
     782   msgbox, 64, name, NEO-Layout ohne Administratorrechte.   `n`n%name% ersetzt das �bliche deutsche   `nTastaturlayout mit der Alternative NEO,   `nbeschrieben auf http://www.de.   `n`nWenn Autohotkey aktiviert ist, werden alle Tastendrucke `nabgefangen und statt dessen eine �bersetzung weitergeschickt. `nDies geschieht transparent f�r den Anwender,  `nes muss nichts installiert werden.   `n`nDie Zeichen�bersetzung kann leicht �ber ein Icon im `nSystemtray deaktiviert werden.  `nAu�erdem kann dort ausgew�hlt werden, ob die Strg-Tasten `nebenfalls �bersetzt werden sollen. `n`n`nSimon Griph, 2004-10-25   `n 
    540783return 
    541784