svkbd

simple virtual keyboard
git clone git://git.suckless.org/svkbd
Log | Files | Refs | README | LICENSE

layout.mobile-plain.h (2556B)


      1 #define KEYS 44
      2 static Key keys_en[KEYS] = {
      3 	{ 0, 0, XK_q, 1 },
      4 	{ 0, 0, XK_w, 1 },
      5 	{ 0, 0, XK_e, 1 },
      6 	{ 0, 0, XK_r, 1 },
      7 	{ 0, 0, XK_t, 1 },
      8 	{ 0, 0, XK_y, 1 },
      9 	{ 0, 0, XK_u, 1 },
     10 	{ 0, 0, XK_i, 1 },
     11 	{ 0, 0, XK_o, 1 },
     12 	{ 0, 0, XK_p, 1 },
     13 
     14 	{ 0 }, /* New row */
     15 
     16 	{ 0, 0, XK_a, 1 },
     17 	{ 0, 0, XK_s, 1 },
     18 	{ 0, 0, XK_d, 1 },
     19 	{ 0, 0, XK_f, 1 },
     20 	{ 0, 0, XK_g, 1 },
     21 	{ 0, 0, XK_h, 1 },
     22 	{ 0, 0, XK_j, 1 },
     23 	{ 0, 0, XK_k, 1 },
     24 	{ 0, 0, XK_l, 1 },
     25 	{ ";",":", XK_colon, 1 },
     26 	/*{ "'", XK_apostrophe, 2 },*/
     27 
     28 	{ 0 }, /* New row */
     29 
     30 	{ 0, 0, XK_z, 1 },
     31 	{ 0, 0, XK_x, 1 },
     32 	{ 0, 0, XK_c, 1 },
     33 	{ 0, 0, XK_v, 1 },
     34 	{ 0, 0, XK_b, 1 },
     35 	{ 0, 0, XK_n, 1 },
     36 	{ 0, 0, XK_m, 1 },
     37 	/*{ "/?", XK_slash, 1 },*/
     38 	{ "Tab", 0, XK_Tab, 1 },
     39 	{ "⇍ Bksp", 0, XK_BackSpace, 2 },
     40 
     41 	{ 0 }, /* New row */
     42 	{ "↺", 0, XK_Cancel, 1},
     43 	{ "Shft", 0, XK_Shift_L, 1 },
     44 	/*{ "L", XK_Left, 1 },*/
     45 	{ "↓", 0, XK_Down, 1 },
     46 	{ "↑", 0, XK_Up, 1 },
     47 	/*{ "R", XK_Right, 1 },*/
     48 	{ "", 0, XK_space, 2 },
     49 	{ "Esc", 0, XK_Escape, 1 },
     50 	{ "Ctrl", 0, XK_Control_L, 1 },
     51 	/*{ "Alt", XK_Alt_L, 1 },*/
     52 	{ "↲ Enter", 0, XK_Return, 2 },
     53 };
     54 
     55 static Key keys_symbols[KEYS] = {
     56 	{ "1", "!", XK_1, 1 },
     57 	{ "2", "@", XK_2, 1 },
     58 	{ "3", "#", XK_3, 1 },
     59 	{ "4", "$", XK_4, 1 },
     60 	{ "5", "%", XK_5, 1 },
     61 	{ "6", "^", XK_6, 1 },
     62 	{ "7", "&", XK_7, 1 },
     63 	{ "8", "*", XK_8, 1 },
     64 	{ "9", "(", XK_9, 1 },
     65 	{ "0", ")", XK_0, 1 },
     66 
     67 	{ 0 }, /* New row */
     68 
     69 	{ "'", "\"", XK_apostrophe, 1 },
     70 	{ "`", "~", XK_grave, 1 },
     71 	{ "-", "_", XK_minus, 1 },
     72 	{ "=", "+", XK_plus, 1 },
     73 	{ "[", "{", XK_bracketleft, 1 },
     74 	{ "]", "}", XK_bracketright, 1 },
     75 	{ ",", "<", XK_comma, 1 },
     76 	{ ".", ">", XK_period, 1 },
     77 	{ "/", "?", XK_slash, 1 },
     78 	{ "\\", "|", XK_backslash, 1 },
     79 
     80 	{ 0 }, /* New row */
     81 
     82 	{ "", 0, XK_Shift_L|XK_bar, 1 },
     83 	{ "⇤", 0, XK_Home, 1 },
     84 	{ "←", 0, XK_Left, 1 },
     85 	{ "→", 0, XK_Right, 1 },
     86 	{ "⇥", 0, XK_End, 1 },
     87 	{ "⇊", 0, XK_Next, 1 },
     88 	{ "⇈", 0, XK_Prior, 1 },
     89 	{ "Tab", 0, XK_Tab, 1 },
     90 	{ "⇍ Bksp", 0, XK_BackSpace, 2 },
     91 
     92 	{ 0 }, /* New row */
     93 	{ "↺", 0, XK_Cancel, 1},
     94 	{ "Shft", 0, XK_Shift_L, 1 },
     95 	{ "↓", 0, XK_Down, 1 },
     96 	{ "↑", 0, XK_Up, 1 },
     97 	{ "", 0, XK_space, 2 },
     98 	{ "Esc", 0, XK_Escape, 1 },
     99 	{ "Ctrl", 0, XK_Control_L, 1 },
    100 	{ "↲ Enter", 0, XK_Return, 2 },
    101 };
    102 
    103 Buttonmod buttonmods[] = {
    104 	{ XK_Shift_L, Button2 },
    105 	{ XK_Alt_L, Button3 },
    106 };
    107 
    108 #define OVERLAYS 1
    109 static Key overlay[OVERLAYS] = {
    110 	{ 0, 0, XK_Cancel },
    111 };
    112 
    113 #define LAYERS 2
    114 static char* layer_names[LAYERS] = {
    115 	"en",
    116 	"symbols",
    117 };
    118 
    119 static Key* available_layers[LAYERS] = {
    120 	keys_en,
    121 	keys_symbols,
    122 };