Back to index

im-sdk  12.3.91
vkb_layout.h
Go to the documentation of this file.
00001 #ifndef _VKB_LAYOUT_H_
00002 #define _VKB_LAYOUT_H_
00003 
00004 enum _vkb_basekey_list {
00005        VK_invalid  = -2,
00006        VK_movearea = -1,
00007        VK_quotedbl = 0,
00008        /* first line of keyboard */
00009        VK_1,
00010        VK_2,
00011        VK_3,
00012        VK_4,
00013        VK_5,
00014        VK_6,
00015        VK_7,
00016        VK_8,
00017        VK_9,
00018        VK_0,
00019        VK_minus,
00020        VK_equal,
00021 
00022        /* second line of keyboard */
00023        VK_q,
00024        VK_w,
00025        VK_e,
00026        VK_r,
00027        VK_t,
00028        VK_y,
00029        VK_u,
00030        VK_i,
00031        VK_o,
00032        VK_p,
00033        VK_bracketleft,
00034        VK_bracketright,
00035        VK_backslash,
00036 
00037        /* third line of keyboard */
00038        VK_a,
00039        VK_s,
00040        VK_d,
00041        VK_f,
00042        VK_g,
00043        VK_h,
00044        VK_j,
00045        VK_k,
00046        VK_l,
00047        VK_semicolon,
00048        VK_apostrophe,
00049        
00050        /* forth line of keyboard */
00051        VK_z,
00052        VK_x,
00053        VK_c,
00054        VK_v,
00055        VK_b,
00056        VK_n,
00057        VK_m,
00058        VK_colon,
00059        VK_period,
00060        VK_slash,
00061 
00062        MAX_BASEKEY_NUM
00063 };
00064 
00065 enum _vkb_ctrlkey_list {
00066        VK_BackSpace = 0,
00067        VK_Tab,
00068        VK_CapsLock,
00069        VK_Enter,
00070        VK_Shift_L,
00071        VK_Control_L,
00072        VK_Alt_L,
00073        VK_Space,
00074        VK_Escape,
00075 
00076        MAX_CTRLKEY_NUM
00077 };
00078 
00079 typedef enum _vkb_type_t {
00080        KEYBOARD_STRING_TYPE = 0,
00081        KEYBOARD_KEY_TYPE,
00082 } vkb_type_t;
00083 
00084 #define MAX_VK_NUM          (MAX_BASEKEY_NUM + MAX_CTRLKEY_NUM)
00085 
00086 #define KEYLIST_LOWER              "`1234567890-=qwertyuiop[]\\asdfghjkl;\'zxcvbnm,./";
00087 #define KEYLIST_UPPER              "~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?";
00088 #define KEYLIST_LABEL              "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;\'ZXCVBNM,./";
00089        
00090 #define BACKSPACE_KEY_LABEL "<--"
00091 #define TAB_KEY_LABEL              "Tab"
00092 #define CAPS_KEY_LABEL             "Caps"
00093 #define ENTER_KEY_LABEL     "Enter"
00094 #define SHIFT_KEY_LABEL            "Shift"
00095 #define CTRL_KEY_LABEL             "Ctrl"
00096 #define ALT_KEY_LABEL              "Alt"
00097 #define SPACE_KEY_LABEL            " "
00098 #define ESCAPE_KEY_LABEL    "Esc"
00099 
00100 typedef struct _vkb_basekey_label_t {
00101        char          *lower_str;
00102        char          *upper_str;
00103 } vkb_basekey_label_t;
00104 
00105 typedef struct _vkb_ctrlkey_label_t {
00106        char          *label_str;
00107 } vkb_ctrlkey_label_t;
00108 
00109 typedef struct _vkb_layout_t {
00110        char          *ename;
00111        char          *name_utf8;
00112        vkb_type_t           type;
00113        vkb_basekey_label_t  basekey[MAX_BASEKEY_NUM];
00114        vkb_ctrlkey_label_t  ctrlkey[MAX_CTRLKEY_NUM];
00115 } vkb_layout_t;
00116 
00117 #endif     /*  _VKB_LAYOUT_H_  */