2016-09-02 19:39:38 +00:00
|
|
|
enum{
|
2017-02-12 06:01:01 +00:00
|
|
|
key_back = 57344,
|
|
|
|
key_up = 57345,
|
|
|
|
key_down = 57346,
|
|
|
|
key_left = 57347,
|
|
|
|
key_right = 57348,
|
|
|
|
key_del = 57349,
|
|
|
|
key_insert = 57350,
|
|
|
|
key_home = 57351,
|
|
|
|
key_end = 57352,
|
|
|
|
key_page_up = 57353,
|
|
|
|
key_page_down = 57354,
|
|
|
|
key_esc = 57355,
|
|
|
|
key_mouse_left = 57356,
|
|
|
|
key_mouse_right = 57357,
|
|
|
|
key_mouse_left_release = 57358,
|
|
|
|
key_mouse_right_release = 57359,
|
|
|
|
key_f1 = 57360,
|
|
|
|
key_f2 = 57361,
|
|
|
|
key_f3 = 57362,
|
|
|
|
key_f4 = 57363,
|
|
|
|
key_f5 = 57364,
|
|
|
|
key_f6 = 57365,
|
|
|
|
key_f7 = 57366,
|
|
|
|
key_f8 = 57367,
|
|
|
|
key_f9 = 57368,
|
|
|
|
key_f10 = 57369,
|
|
|
|
key_f11 = 57370,
|
|
|
|
key_f12 = 57371,
|
|
|
|
key_f13 = 57372,
|
|
|
|
key_f14 = 57373,
|
|
|
|
key_f15 = 57374,
|
|
|
|
key_f16 = 57375,
|
2016-02-25 23:52:11 +00:00
|
|
|
};
|
2016-06-07 16:26:11 +00:00
|
|
|
static char*
|
2016-08-29 01:03:26 +00:00
|
|
|
global_key_name(int32_t key_code, int32_t *size){
|
2016-06-07 16:26:11 +00:00
|
|
|
char *result = 0;
|
|
|
|
switch(key_code){
|
|
|
|
case key_back: result = "back"; *size = sizeof("back")-1; break;
|
|
|
|
case key_up: result = "up"; *size = sizeof("up")-1; break;
|
|
|
|
case key_down: result = "down"; *size = sizeof("down")-1; break;
|
|
|
|
case key_left: result = "left"; *size = sizeof("left")-1; break;
|
|
|
|
case key_right: result = "right"; *size = sizeof("right")-1; break;
|
|
|
|
case key_del: result = "del"; *size = sizeof("del")-1; break;
|
|
|
|
case key_insert: result = "insert"; *size = sizeof("insert")-1; break;
|
|
|
|
case key_home: result = "home"; *size = sizeof("home")-1; break;
|
|
|
|
case key_end: result = "end"; *size = sizeof("end")-1; break;
|
|
|
|
case key_page_up: result = "page_up"; *size = sizeof("page_up")-1; break;
|
|
|
|
case key_page_down: result = "page_down"; *size = sizeof("page_down")-1; break;
|
|
|
|
case key_esc: result = "esc"; *size = sizeof("esc")-1; break;
|
2016-06-07 18:52:40 +00:00
|
|
|
case key_mouse_left: result = "mouse_left"; *size = sizeof("mouse_left")-1; break;
|
|
|
|
case key_mouse_right: result = "mouse_right"; *size = sizeof("mouse_right")-1; break;
|
2016-09-09 17:14:38 +00:00
|
|
|
case key_mouse_left_release: result = "mouse_left_release"; *size = sizeof("mouse_left_release")-1; break;
|
|
|
|
case key_mouse_right_release: result = "mouse_right_release"; *size = sizeof("mouse_right_release")-1; break;
|
2016-06-07 16:26:11 +00:00
|
|
|
case key_f1: result = "f1"; *size = sizeof("f1")-1; break;
|
|
|
|
case key_f2: result = "f2"; *size = sizeof("f2")-1; break;
|
|
|
|
case key_f3: result = "f3"; *size = sizeof("f3")-1; break;
|
|
|
|
case key_f4: result = "f4"; *size = sizeof("f4")-1; break;
|
|
|
|
case key_f5: result = "f5"; *size = sizeof("f5")-1; break;
|
|
|
|
case key_f6: result = "f6"; *size = sizeof("f6")-1; break;
|
|
|
|
case key_f7: result = "f7"; *size = sizeof("f7")-1; break;
|
|
|
|
case key_f8: result = "f8"; *size = sizeof("f8")-1; break;
|
|
|
|
case key_f9: result = "f9"; *size = sizeof("f9")-1; break;
|
|
|
|
case key_f10: result = "f10"; *size = sizeof("f10")-1; break;
|
|
|
|
case key_f11: result = "f11"; *size = sizeof("f11")-1; break;
|
|
|
|
case key_f12: result = "f12"; *size = sizeof("f12")-1; break;
|
|
|
|
case key_f13: result = "f13"; *size = sizeof("f13")-1; break;
|
|
|
|
case key_f14: result = "f14"; *size = sizeof("f14")-1; break;
|
|
|
|
case key_f15: result = "f15"; *size = sizeof("f15")-1; break;
|
|
|
|
case key_f16: result = "f16"; *size = sizeof("f16")-1; break;
|
|
|
|
}
|
|
|
|
return(result);
|
|
|
|
}
|