mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
Convert keypresses to UCS4. Fixes issue with typing Euro symbol (¤). Probably fixes
other characters in more exotic character sets. svn path=/trunk/netsurf/; revision=12789
This commit is contained in:
parent
b2d5492b84
commit
6a5b10c685
@ -811,6 +811,7 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
|
||||
{
|
||||
int nskey = 0, chars;
|
||||
UBYTE buffer[20];
|
||||
char *utf8 = NULL;
|
||||
|
||||
if(keycode >= IECODE_UP_PREFIX) return 0;
|
||||
|
||||
@ -903,7 +904,8 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
|
||||
default:
|
||||
if((chars = MapRawKey(ie,buffer,20,NULL)) > 0)
|
||||
{
|
||||
nskey = buffer[0];
|
||||
utf8_from_local_encoding(buffer, chars, &utf8);
|
||||
nskey = utf8_to_ucs4(utf8, utf8_char_byte_length(utf8));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user