It is now possible to specify keyboard type, subtype and number of functionskeys. From patch #974509, by Dekaino.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@963 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
1320755f2b
commit
8882a06591
@ -117,6 +117,32 @@ The sequence is sent at the X11 KeyPress event. Nothing is sent at
|
||||
KeyRelease.
|
||||
|
||||
|
||||
6) keyboard_type lines
|
||||
Syntax:
|
||||
keyboard_type <hex-number>
|
||||
|
||||
keyboard_type lines specifies the keyboard type. Default value is 0x4
|
||||
(en-us 101/104 keys keyboard).
|
||||
|
||||
|
||||
7) keyboard_subtype lines
|
||||
Syntax:
|
||||
keyboard_subtype <hex-number>
|
||||
|
||||
keyboard_subtype lines specifies the keyboard subtype. Default value
|
||||
is 0x0 (en-us 101/104 keys keyboard).
|
||||
|
||||
|
||||
8) keyboard_functionkeys lines
|
||||
Syntax:
|
||||
keyboard_functionkeys <hex-number>
|
||||
|
||||
keyboard_functionkeys specifies the number of keyboard function
|
||||
keys. Default value is 0xc (12, for standard 101/104 keys keyboard).
|
||||
|
||||
|
||||
|
||||
|
||||
Suggested X11 keysym mapping on PCs
|
||||
===================================
|
||||
Unfortunately, there is no standard for which keysyms a given key
|
||||
|
@ -1,6 +1,9 @@
|
||||
# generated from XKB map jp106
|
||||
include common
|
||||
map 0x411
|
||||
keyboard_type 0x7
|
||||
keyboard_subtype 0x2
|
||||
keyboard_functionkeys 0xc
|
||||
exclam 0x02 shift
|
||||
kana_NU 0x02 altgr
|
||||
quotedbl 0x03 shift
|
||||
|
@ -52,6 +52,9 @@ char g_username[64];
|
||||
char g_hostname[16];
|
||||
char keymapname[PATH_MAX] = "en-us";
|
||||
int g_keylayout = 0x409; /* Defaults to US keyboard layout */
|
||||
int g_keyboard_type = 0x4; /* Defaults to US keyboard layout */
|
||||
int g_keyboard_subtype = 0x0; /* Defaults to US keyboard layout */
|
||||
int g_keyboard_functionkeys = 0xc; /* Defaults to US keyboard layout */
|
||||
|
||||
int g_width = 800; /* width is special: If 0, the
|
||||
geometry will be fetched from
|
||||
|
9
secure.c
9
secure.c
@ -30,6 +30,9 @@ extern char g_hostname[16];
|
||||
extern int g_width;
|
||||
extern int g_height;
|
||||
extern int g_keylayout;
|
||||
extern int g_keyboard_type;
|
||||
extern int g_keyboard_subtype;
|
||||
extern int g_keyboard_functionkeys;
|
||||
extern BOOL g_encryption;
|
||||
extern BOOL g_licence_issued;
|
||||
extern BOOL g_use_rdp5;
|
||||
@ -446,9 +449,9 @@ sec_out_mcs_data(STREAM s)
|
||||
rdp_out_unistr(s, g_hostname, hostlen);
|
||||
out_uint8s(s, 30 - hostlen);
|
||||
|
||||
out_uint32_le(s, 4);
|
||||
out_uint32(s, 0);
|
||||
out_uint32_le(s, 12);
|
||||
out_uint32_le(s, g_keyboard_type);
|
||||
out_uint32_le(s, g_keyboard_subtype);
|
||||
out_uint32_le(s, g_keyboard_functionkeys);
|
||||
out_uint8s(s, 64); /* reserved? 4 + 12 doublewords */
|
||||
out_uint16_le(s, 0xca01); /* colour depth? */
|
||||
out_uint16_le(s, 1);
|
||||
|
28
xkeymap.c
28
xkeymap.c
@ -42,6 +42,9 @@ extern Display *g_display;
|
||||
extern Window g_wnd;
|
||||
extern char keymapname[16];
|
||||
extern int g_keylayout;
|
||||
extern int g_keyboard_type;
|
||||
extern int g_keyboard_subtype;
|
||||
extern int g_keyboard_functionkeys;
|
||||
extern int g_win_button_size;
|
||||
extern BOOL g_enable_compose;
|
||||
extern BOOL g_use_rdp5;
|
||||
@ -341,6 +344,31 @@ xkeymap_read(char *mapname)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* keyboard_type */
|
||||
if (strncmp(line, "keyboard_type ", sizeof("keyboard_type ")) == 0)
|
||||
{
|
||||
g_keyboard_type = strtol(line + sizeof("keyboard_type "), NULL, 16);
|
||||
DEBUG_KBD(("keyboard_type 0x%x\n", g_keyboard_type));
|
||||
continue;
|
||||
}
|
||||
|
||||
/* keyboard_subtype */
|
||||
if (strncmp(line, "keyboard_subtype ", sizeof("keyboard_subtype ")) == 0)
|
||||
{
|
||||
g_keyboard_subtype = strtol(line + sizeof("keyboard_subtype "), NULL, 16);
|
||||
DEBUG_KBD(("keyboard_subtype 0x%x\n", g_keyboard_subtype));
|
||||
continue;
|
||||
}
|
||||
|
||||
/* keyboard_functionkeys */
|
||||
if (strncmp(line, "keyboard_functionkeys ", sizeof("keyboard_functionkeys ")) == 0)
|
||||
{
|
||||
g_keyboard_functionkeys =
|
||||
strtol(line + sizeof("keyboard_functionkeys "), NULL, 16);
|
||||
DEBUG_KBD(("keyboard_functionkeys 0x%x\n", g_keyboard_functionkeys));
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
if (line[0] == '#')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user