воскресенье, 3 сентября 2017 г.

Фиксим rdpKeyboard.c

setxkbmap -layout "us,ru(winkeys)" -model "pc105" -option "grp:alt_shift_toggle"
 
keyboard layout set only to "us" after reconnect session instead "us,ru" 
 
$ cd /home/user/xorgxrdp/xrdpkeyb
$ nano /home/user/xorgxrdp/xrdpkeyb/rdpKeyboard.c
 
Ищем set.model
 
Находим rdpkeybControl(DeviceIntPtr device, int what) 
/******************************************************************************/
static int
rdpkeybControl(DeviceIntPtr device, int what)
{
    KeySymsRec keySyms;
    CARD8 modMap[MAP_LENGTH];
    DevicePtr pDev;
    XkbRMLVOSet set;
    rdpPtr dev;

    LLOGLN(0, ("rdpkeybControl: what %d", what));
    pDev = (DevicePtr)device;

    switch (what)
    {
        case DEVICE_INIT:
            rdpkeybDeviceInit(device, &keySyms, modMap);
            memset(&set, 0, sizeof(set));
            set.rules = g_base_str;
            // BEGIN-FIX
            //set.model = g_pc104_str;
            //set.layout = g_us_str;
            //set.variant = g_empty_str;
            //set.options = g_empty_str;
            set.model = "pc105";
            set.layout = "us,ru";
            set.variant = "";
            set.options = "grp:alt_shift_toggle";
            // END-FIX
Находим rdpLoadLayout(rdpKeyboard *keyboard, struct xrdp_client_info *client_info)
/******************************************************************************/
static int
rdpLoadLayout(rdpKeyboard *keyboard, struct xrdp_client_info *client_info)
{
    XkbRMLVOSet set;

    int keylayout = client_info->keylayout;

    LLOGLN(0, ("rdpLoadLayout: keylayout 0x%8.8x variant %s display %s",
               keylayout, client_info->variant, display));
    memset(&set, 0, sizeof(set));
    set.rules = g_base_str;
    // BEGIN-FIX
    //set.model = g_pc104_str;
    //set.layout = g_us_str;
    //set.variant = g_empty_str;
    //set.options = g_empty_str;
    set.model = "pc105";
    set.layout = "us,ru";
    set.variant = "";
    set.options = "grp:alt_shift_toggle";
    // END-FIX

Комментариев нет:

Отправить комментарий