Remove duplicated constants from egw_keymanager

This commit is contained in:
Hadi Nategh 2021-06-14 14:57:42 +02:00
parent 4159532f45
commit e0341e49e6

View File

@ -15,87 +15,13 @@
import {egw_getAppObjectManager, egw_globalObjectManager} from "./egw_action.js";
import {_egw_active_menu} from "./egw_menu.js";
import {EGW_AO_FLAG_DEFAULT_FOCUS, EGW_AO_EXEC_SELECTED} from "./egw_action_constants.js";
/**
* Define the key constants (IE doesn't support "const" keyword)
*/
export const EGW_KEY_BACKSPACE = 8;
export const EGW_KEY_TAB = 9;
export const EGW_KEY_ENTER = 13;
export const EGW_KEY_ESCAPE = 27;
export const EGW_KEY_DELETE = 46;
export const EGW_KEY_SPACE = 32;
export const EGW_KEY_PAGE_UP = 33;
export const EGW_KEY_PAGE_DOWN = 34;
export const EGW_KEY_ARROW_LEFT = 37;
export const EGW_KEY_ARROW_UP = 38;
export const EGW_KEY_ARROW_RIGHT = 39;
export const EGW_KEY_ARROW_DOWN = 40;
export const EGW_KEY_0 = 48;
export const EGW_KEY_1 = 49;
export const EGW_KEY_2 = 50;
export const EGW_KEY_3 = 51;
export const EGW_KEY_4 = 52;
export const EGW_KEY_5 = 53;
export const EGW_KEY_6 = 54;
export const EGW_KEY_7 = 55;
export const EGW_KEY_8 = 56;
export const EGW_KEY_9 = 57;
export const EGW_KEY_A = 65;
export const EGW_KEY_B = 66;
export const EGW_KEY_C = 67;
export const EGW_KEY_D = 68;
export const EGW_KEY_E = 69;
export const EGW_KEY_F = 70;
export const EGW_KEY_G = 71;
export const EGW_KEY_H = 72;
export const EGW_KEY_I = 73;
export const EGW_KEY_J = 74;
export const EGW_KEY_K = 75;
export const EGW_KEY_L = 76;
export const EGW_KEY_M = 77;
export const EGW_KEY_N = 78;
export const EGW_KEY_O = 79;
export const EGW_KEY_P = 80;
export const EGW_KEY_Q = 81;
export const EGW_KEY_R = 82;
export const EGW_KEY_S = 83;
export const EGW_KEY_T = 84;
export const EGW_KEY_U = 85;
export const EGW_KEY_V = 86;
export const EGW_KEY_W = 87;
export const EGW_KEY_X = 88;
export const EGW_KEY_Y = 89;
export const EGW_KEY_Z = 90;
export const EGW_KEY_MENU = 93;
export const EGW_KEY_F1 = 112;
export const EGW_KEY_F2 = 113;
export const EGW_KEY_F3 = 114;
export const EGW_KEY_F4 = 115;
export const EGW_KEY_F5 = 116;
export const EGW_KEY_F6 = 117;
export const EGW_KEY_F7 = 118;
export const EGW_KEY_F8 = 119;
export const EGW_KEY_F9 = 120;
export const EGW_KEY_F10 = 121;
export const EGW_KEY_F11 = 122;
export const EGW_KEY_F12 = 123;
export const EGW_VALID_KEYS = [
8, 9, 13, 27, 46, 32, 33, 34, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 93, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123
]
import {
EGW_AO_FLAG_DEFAULT_FOCUS,
EGW_AO_EXEC_SELECTED,
EGW_VALID_KEYS,
EGW_KEY_MENU,
EGW_KEY_F1, EGW_KEY_F12
} from "./egw_action_constants.js";
/**
* The tranlation function converts the given native key code into one of the