Hi,
I live in Croatia and to enter some characters (šđčćž) we use cp1250 (latin2)
codepage.
But I like to use US keyboard layout. So I tried to map following in US
layout:
AppsKey+[ = š
AppsKey+] = đ
AppsKey+; = č
AppsKey+' = ć
AppsKey+\ = ž
[and with shift uppercase versions]
I found a solution:
http://www.autohotkey.com/forum/viewtop ... 345#137345
But I cannot enter đčć in some apps like PuTTY while using US locale (I get dcc instead). Switching to Croatian locale those Appkey combinations work
flawlessly but I dislike many remapped keys in Croatian layout.
So I reversed my logic. I will use croatian layout and remap some keys
to match US layout. Well, of course, it ALMOST worked
These comabinations are not working correctly:
AppsKey + ; gives =
AppsKey + SHIFT + ; gives _
It should give č and Č.
It seems that SendU(0x010D) and SendU(0x010C) are interpreted
like pressing scancode
SC00D::Send {=}
and
+SC00C::Send {_}
Why is that ? Any workarounds ?
I must use some SSH terminal and all ssh clients I tried mess up šđčćž
letters except putty, but putty has troubles with đčć while set in US layout.
Code:
DllCall("LoadLibrary", Str,"ntdll.dll")
VarSetCapacity( SendUbuf, 56, 0 ) ; INIT SendU data strucure
DllCall("RtlFillMemory", UInt,&SendUbuf, UInt,1, UInt,1)
DllCall("RtlFillMemory", UInt,&SendUbuf+28, UInt,1, UInt,1)
AppsKey & SC01A::
GetKeyState, State, SHIFT
if State = U
SendU(0x0161)
else
SendU(0x0160)
Return
AppsKey & SC01B::
GetKeyState, State, SHIFT
if State = U
SendU(0x0111)
else
SendU(0x0110)
Return
AppsKey & SC027::
GetKeyState, State, SHIFT
if State = U
SendU(0x010D)
else
SendU(0x010C)
Return
AppsKey & SC028::
GetKeyState, State, SHIFT
if State = U
SendU(0x0107)
else
SendU(0x0106)
Return
AppsKey & SC02B::
GetKeyState, State, SHIFT
if State = U
SendU(0x017E)
else
SendU(0x017D)
Return
SendU(UC) { ; Send Char/Unicode, Pressed modifier keys stay active!
Global ; SendU(0x00E1) or SendU(33)
DllCall("ntdll.dll\RtlFillMemoryUlong",UInt,&SendUbuf+6, UInt,4,UInt,0x40000|UC) ;KEYEVENTF_UNICODE
DllCall("ntdll.dll\RtlFillMemoryUlong",UInt,&SendUbuf+34,UInt,4,UInt,0x60000|UC) ;KEYEVENTF_KEYUP|^
Return DllCall("SendInput", UInt,2, UInt,&SendUbuf, Int,28)
}
y::z
z::y
SC01A::Send {[}
+SC01A::Send {{}
SC01B::Send {]}
+SC01B::Send {}}
SC027::Send {;}
+SC027::Send {:}
SC028::Send {'}
+SC028::Send {"}
SC02B::Send {\}
+SC02B::Send {|}
+SC003::Send {@}
+SC007::Send {^}
+SC008::Send {&}
+SC009::Send {*}
+SC00A::Send {(}
+SC00B::Send {)}
SC00C::Send {-}
+SC00C::Send {_}
SC00D::Send {=}
+SC00D::Send {+}
;SC029::Send {`}
+SC029::Send {~}
+SC033::Send {<}
+SC034::Send {>}
SC035::Send {/}
+SC035::Send {?}