Skip to content

Commit

Permalink
add mappings for media keys
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Apr 3, 2024
1 parent e73f26c commit c57cf35
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 15 deletions.
128 changes: 123 additions & 5 deletions genkeymap/evdev-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <config_ac.h>
#endif

int xfree86_to_evdev[137 - 8 + 1] =
int xfree86_to_evdev[255 - 8 + 1] =
{
/* MDSW */ 203,
/* ESC */ 9,
Expand Down Expand Up @@ -141,9 +141,9 @@ int xfree86_to_evdev[137 - 8 + 1] =
/* FK13 */ 191,
/* FK14 */ 192,
/* FK15 */ 193,
/* FK16 */ 194,
/* FK17 */ 195,
/* KPDC */ 0,
/* XF86AudioMute */ 121,
/* XF86AudioLowerVolume */ 122,
/* XF86AudioRaiseVolume */ 123,
/* LVL3 */ 92,
/* ALT */ 204,
/* KPEQ */ 125,
Expand All @@ -156,6 +156,124 @@ int xfree86_to_evdev[137 - 8 + 1] =
/* AE13 */ 132,
/* I06 */ 0,
/* I07 */ 0,
/* Cancel */ 136,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
/* XF86Launch1 */ 156,
/* XF86Launch2 */ 157,
0,
0,
0,
0,
0,
/* XF86Mail */ 163,
/* XF86Favorites */ 164,
0,
/* XF86Back */ 166,
/* XF86Forward */ 167,
0,
0,
0,
/* XF86AudioNext */ 171,
/* XF86AudioPlay */ 172,
/* XF86AudioPrev */ 173,
/* XF86AudioStop */ 174,
0,
0,
0,
0,
0,
/* XF86HomePage */ 180,
/* XF86Reload */ 181,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
/* XF86Search */ 225,
0,
0,
0,
0,
0,
0,
0,
0,
/* XF86AudioMedia */ 234,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
};
2 changes: 1 addition & 1 deletion genkeymap/genkeymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ int main(int argc, char **argv)
fprintf(outf, "[%s]\n", sections[idx]);
e.state = states[idx];

for (i = 8; i < 137; i++) /* Keycodes */
for (i = 8; i < 256; i++) /* Keycodes */
{
if (is_evdev)
{
Expand Down
18 changes: 9 additions & 9 deletions xrdp/lang.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ static struct codepair g_map[] =
{ 0, 0 }, { 9, 0 }, { 10, 0 }, { 11, 0 }, { 12, 0 }, /* 0 - 4 */
{ 13, 0 }, { 14, 0 }, { 15, 0 }, { 16, 0 }, { 17, 0 }, /* 5 - 9 */
{ 18, 0 }, { 19, 0 }, { 20, 0 }, { 21, 0 }, { 22, 0 }, /* 10 - 14 */
{ 23, 0 }, { 24, 0 }, { 25, 0 }, { 26, 0 }, { 27, 0 }, /* 15 - 19 */
{ 23, 0 }, { 24, 173 }, { 25, 0 }, { 26, 0 }, { 27, 0 }, /* 15 - 19 */
{ 28, 0 }, { 29, 0 }, { 30, 0 }, { 31, 0 }, { 32, 0 }, /* 20 - 24 */
{ 33, 0 }, { 34, 0 }, { 35, 0 }, { 36, 108 }, { 37, 109 }, /* 25 - 29 */
{ 38, 0 }, { 39, 0 }, { 40, 0 }, { 41, 0 }, { 42, 0 }, /* 30 - 34 */
{ 43, 0 }, { 44, 0 }, { 45, 0 }, { 46, 0 }, { 47, 0 }, /* 35 - 39 */
{ 33, 171 }, { 34, 0 }, { 35, 0 }, { 36, 108 }, { 37, 109 }, /* 25 - 29 */
{ 38, 0 }, { 39, 0 }, { 40, 121 }, { 41, 0 }, { 42, 172 }, /* 30 - 34 */
{ 43, 0 }, { 44, 174 }, { 45, 0 }, { 46, 0 }, { 47, 0 }, /* 35 - 39 */
{ 48, 0 }, { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 }, /* 40 - 44 */
{ 53, 0 }, { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 }, /* 45 - 49 */
{ 58, 0 }, { 59, 0 }, { 60, 0 }, { 61, 112 }, { 62, 0 }, /* 50 - 54 */
{ 53, 0 }, { 54, 122 }, { 55, 0 }, { 56, 123 }, { 57, 0 }, /* 45 - 49 */
{ 58, 180 }, { 59, 0 }, { 60, 0 }, { 61, 112 }, { 62, 0 }, /* 50 - 54 */
{ 63, 111 }, { 64, 113 }, { 65, 0 }, { 66, 0 }, { 67, 0 }, /* 55 - 59 */
{ 68, 0 }, { 69, 0 }, { 70, 0 }, { 71, 0 }, { 72, 0 }, /* 60 - 64 */
{ 73, 0 }, { 74, 0 }, { 75, 0 }, { 76, 0 }, { 77, 0 }, /* 65 - 69 */
Expand All @@ -57,9 +57,9 @@ static struct codepair g_map[] =
{ 93, 0 }, { 94, 0 }, { 95, 0 }, { 96, 0 }, { 97, 0 }, /* 85 - 89 */
{ 98, 0 }, { 0, 115 }, { 0, 116 }, { 0, 117 }, { 102, 0 }, /* 90 - 94 */
{ 103, 0 }, { 104, 0 }, { 105, 0 }, { 106, 0 }, { 107, 0 }, /* 95 - 99 */
{ 108, 0 }, { 109, 0 }, { 110, 0 }, { 111, 0 }, { 112, 0 }, /* 100 - 104 */
{ 113, 0 }, { 114, 0 }, { 115, 0 }, { 116, 0 }, { 117, 0 }, /* 105 - 109 */
{ 118, 0 }, { 119, 0 }, { 120, 0 }, { 121, 0 }, { 122, 0 }, /* 110 - 114 */
{ 108, 0 }, { 109, 225 }, { 110, 164 }, { 111, 181 }, { 112, 136 }, /* 100 - 104 */
{ 113, 167 }, { 114, 166 }, { 115, 0 }, { 116, 163 }, { 117, 234 }, /* 105 - 109 */
{ 118, 156 }, { 119, 157 }, { 120, 0 }, { 121, 0 }, { 122, 0 }, /* 110 - 114 */
{ 123, 0 }, { 124, 0 }, { 125, 0 }, { 126, 0 }, { 127, 0 }, /* 115 - 119 */
{ 128, 0 }, { 129, 0 }, { 130, 0 }, { 131, 0 }, { 132, 0 }, /* 120 - 124 */
{ 133, 0 }, { 134, 0 }, { 135, 0 } /* 125 - 127 */
Expand Down

0 comments on commit c57cf35

Please sign in to comment.