Skip to content

Commit

Permalink
add Hebrew (Standard) layout (#59)
Browse files Browse the repository at this point in the history
* add Hebrew (Standard) layout

* locally define KBD IDs if missing in FreeRDP

Co-authored-by: Hideyuki Nagase <hideyukn@ntdev.microsoft.com>
  • Loading branch information
hideyukn88 and Hideyuki Nagase committed Mar 22, 2022
1 parent a106a22 commit 52f13ac
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions libweston/backend-rdp/rdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,16 @@ struct rdp_to_xkb_keyboard_layout {

/* table reversed from
https://github.com/awakecoding/FreeRDP/blob/master/libfreerdp/locale/xkb_layout_ids.c#L811 */
/* Locally define missing keyboard layout IDs in FreeRDP 2.x */
#ifndef KBD_HEBREW_STANDARD
/* 0x2040d is for Hebrew (Standard) */
#define KBD_HEBREW_STANDARD 0x2040d
#endif
#ifndef KBD_PERSIAN
/* 0x50429 is for Dari (Afghanistan) */
#define KBD_PERSIAN 0x50429
#endif

static const
struct rdp_to_xkb_keyboard_layout rdp_keyboards[] = {
{KBD_ARABIC_101, "ara", 0},
Expand All @@ -992,6 +1002,7 @@ struct rdp_to_xkb_keyboard_layout rdp_keyboards[] = {
{KBD_FINNISH, "fi", 0},
{KBD_FRENCH, "fr", 0},
{KBD_HEBREW, "il", 0},
{KBD_HEBREW_STANDARD, "il", "basic"},
{KBD_HUNGARIAN, "hu", 0},
{KBD_HUNGARIAN_101_KEY, "hu", "standard"},
{KBD_ICELANDIC, "is", 0},
Expand Down Expand Up @@ -1029,12 +1040,7 @@ struct rdp_to_xkb_keyboard_layout rdp_keyboards[] = {
// Such as key <AE01>~<AE10> is 1,2,3...0 on Windows, not Persian numbers,
// but Xkb doesn't have that layout in "ir" group.
{KBD_FARSI, "ir", "pes"},
// 0x50429 is for Dari(Afghanistan)
#if WINPR_VERSION_MAJOR >= 3
{KBD_PERSIAN, "af", "basic"},
#else
{0x50429, "af", "basic"},
#endif
{KBD_VIETNAMESE, "vn", 0},
{KBD_ARMENIAN_EASTERN, "am", 0},
{KBD_AZERI_LATIN, 0, 0},
Expand Down

0 comments on commit 52f13ac

Please sign in to comment.