AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

scancode conflict with unicode character

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
madmax83



Joined: 20 Jul 2007
Posts: 5

PostPosted: Fri Aug 03, 2007 12:10 am    Post subject: scancode conflict with unicode character Reply with quote

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/viewtopic.php?p=137345#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 Sad

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 {?}
Back to top
View user's profile Send private message Send e-mail
BoBo¨
Guest





PostPosted: Sat Aug 04, 2007 7:03 am    Post subject: Reply with quote

Quote:
Free* SSH file transfer, terminal and tunneling!
Tunnelier is a SSH and SFTP client for Windows which incorporates:

one of the most advanced graphical SFTP clients;
state-of-the-art terminal emulation with support for the bvterm, xterm, and vt100 protocols;
support for corporation-wide single sign-on using SSPI (GSSAPI) Kerberos 5 and NTLM user authentication, as well as Kerberos 5 host authentication;
support for RSA and DSA public key authentication with comprehensive user keypair management;
powerful SSH port forwarding capabilities, including dynamic forwarding through integrated SOCKS and HTTP CONNECT proxy;
powerful command-line parameters which make Tunnelier highly customizable and suitable for use in specific situations and controlled environments;
an advanced, scriptable command-line SFTP client (sftpc);
a scriptable command-line remote execution client (sexec) and a command-line terminal emulation client (stermc);
an FTP-to-SFTP bridge allowing you to connect to an SFTP server using legacy FTP applications;
WinSSHD remote administration features;
single-click Remote Desktop forwarding.
* Since version 3.60, Tunnelier is free for individual use, as well as for limited use inside organizations. To begin, simply download the installation executable - you will find the download links on our download page. Check the Tunnelier license to see if you can use it free of charge or whether a right of use needs to be purchased for your environment.

.
.
.

Terminal Access - Remote Console
Tunnelier provides integrated access to the SSH server's console, either via VT-100 and xterm protocols supported by most SSH servers on any platform, or via the enhanced bvterm protocol supported by WinSSHD:

all terminal emulation is done in a regular Windows console, using standard Windows fonts, supporting standard settings for Windows consoles;
UTF support with VT-100 and xterm, Unicode support with bvterm (full Unicode support on NT-series Windows platforms);
full color support with xterm and bvterm;
support for large screen buffers, all key combinations including Alt-keys and accurate console rendering with bvterm (fully accurate on NT-series Windows platforms).
Tunnelier also incorporates a command line terminal emulation client, stermc, as well as a command-line remote execution client (sexec).

[More..]
Back to top
daonlyfreez



Joined: 16 Mar 2005
Posts: 949
Location: Berlin

PostPosted: Sat Aug 04, 2007 10:31 am    Post subject: Reply with quote

Great find! Cool
_________________
mirror 1mirror 2mirror 3ahk4.me • PM or
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group