neutrinordp: Allow keyboard layout information to be sent to remote. #1933
This commit is contained in:
parent
27107039d6
commit
e0a482fbfc
@ -94,10 +94,50 @@ lxrdp_start(struct mod *mod, int w, int h, int bpp)
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* return error */
|
/* return error */
|
||||||
|
static void
|
||||||
|
set_keyboard_overrides(struct mod *mod)
|
||||||
|
{
|
||||||
|
rdpSettings *settings = mod->inst->settings;
|
||||||
|
|
||||||
|
if (mod->allow_client_kbd_settings)
|
||||||
|
{
|
||||||
|
settings->kbd_type = mod->client_info.keyboard_type;
|
||||||
|
settings->kbd_subtype = mod->client_info.keyboard_subtype;
|
||||||
|
/* Define the most common number of function keys, 12.
|
||||||
|
because we can't get it from client. */
|
||||||
|
settings->kbd_fn_keys = 12;
|
||||||
|
settings->kbd_layout = mod->client_info.keylayout;
|
||||||
|
|
||||||
|
/* Exception processing for each RDP Keyboard type */
|
||||||
|
if (mod->client_info.keyboard_type == 0x00)
|
||||||
|
{
|
||||||
|
/* 0x00000000 : Set on Server */
|
||||||
|
LOG(LOG_LEVEL_WARNING, "keyboard_type:[0x%02x] ,Set on Server",
|
||||||
|
mod->client_info.keyboard_type);
|
||||||
|
}
|
||||||
|
else if (mod->client_info.keyboard_type == 0x04)
|
||||||
|
{
|
||||||
|
/* 0x00000004 : IBM enhanced (101- or 102-key) keyboard */
|
||||||
|
/* Nothing to do. */
|
||||||
|
}
|
||||||
|
else if (mod->client_info.keyboard_type == 0x07)
|
||||||
|
{
|
||||||
|
/* 0x00000007 : Japanese keyboard */
|
||||||
|
/* Nothing to do. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LOG(LOG_LEVEL_INFO, "NeutrinoRDP proxy remote keyboard settings, "
|
||||||
|
"kbd_type:[0x%02X], kbd_subtype:[0x%02X], "
|
||||||
|
"kbd_fn_keys:[%02d], kbd_layout:[0x%08X]",
|
||||||
|
settings->kbd_type, settings->kbd_subtype,
|
||||||
|
settings->kbd_fn_keys, settings->kbd_layout);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
lxrdp_connect(struct mod *mod)
|
lxrdp_connect(struct mod *mod)
|
||||||
{
|
{
|
||||||
boolean ok;
|
boolean ok;
|
||||||
|
set_keyboard_overrides(mod);
|
||||||
|
|
||||||
LOG_DEVEL(LOG_LEVEL_TRACE, "lxrdp_connect:");
|
LOG_DEVEL(LOG_LEVEL_TRACE, "lxrdp_connect:");
|
||||||
|
|
||||||
@ -610,6 +650,10 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
|
|||||||
mod->perf_settings_values_mask |= PERF_DISABLE_CURSOR_SHADOW;
|
mod->perf_settings_values_mask |= PERF_DISABLE_CURSOR_SHADOW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (g_strcmp(name, "neutrinordp.allow_client_keyboardLayout") == 0)
|
||||||
|
{
|
||||||
|
mod->allow_client_kbd_settings = g_text2bool(value);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [%s]", name, value);
|
LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [%s]", name, value);
|
||||||
|
@ -222,4 +222,5 @@ struct mod
|
|||||||
int allow_client_experiencesettings;
|
int allow_client_experiencesettings;
|
||||||
int perf_settings_override_mask; /* Performance bits overridden in ini file */
|
int perf_settings_override_mask; /* Performance bits overridden in ini file */
|
||||||
int perf_settings_values_mask; /* Values of overridden performance bits */
|
int perf_settings_values_mask; /* Values of overridden performance bits */
|
||||||
|
int allow_client_kbd_settings;
|
||||||
};
|
};
|
||||||
|
@ -275,6 +275,10 @@ password=ask
|
|||||||
; you problems (e.g. cursor is a black rectangle) try disabling cursor
|
; you problems (e.g. cursor is a black rectangle) try disabling cursor
|
||||||
; shadows by uncommenting the following line.
|
; shadows by uncommenting the following line.
|
||||||
#perf.cursor_shadow=false
|
#perf.cursor_shadow=false
|
||||||
|
; By default, NeutrinoRDP uses the keyboard layout of the remote RDP Server.
|
||||||
|
; If you want to tell the remote the keyboard layout of the RDP Client,
|
||||||
|
; by uncommenting the following line.
|
||||||
|
#neutrinordp.allow_client_keyboardLayout=true
|
||||||
|
|
||||||
; You can override the common channel settings for each session type
|
; You can override the common channel settings for each session type
|
||||||
#channel.rdpdr=true
|
#channel.rdpdr=true
|
||||||
|
Loading…
Reference in New Issue
Block a user