Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset dcbb3ec in mainline


Ignore:
Timestamp:
2011-07-15T18:14:00Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
89d3f3c7
Parents:
333c233
Message:

Add sequences specific to Gnome terminal to stty (Home, End, Backspace).

Location:
uspace/srv/hid/input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/ctl/stty.c

    r333c233 rdcbb3ec  
    3434 * @file
    3535 * @brief Serial TTY-like keyboard controller driver.
     36 *
     37 * Keyboard emulation on a serial terminal.
    3638 */
    3739
     
    6365#include <stdio.h>
    6466
     67/**
     68 * Sequnece definitions are primarily for Xterm. Additionally we define
     69 * sequences that are unique to Gnome terminal -- most are the same but
     70 * some differ.
     71 */
    6572static int seq_defs[] = {
    6673        /* Not shifted */
     
    8188        0,      KC_MINUS,       0x2d, GSP_END,
    8289        0,      KC_EQUALS,      0x3d, GSP_END,
     90
    8391        0,      KC_BACKSPACE,   0x08, GSP_END,
    8492
     
    216224        0,      KC_RIGHT,       0x1b, 0x5b, 0x43, GSP_END,
    217225
     226        /*
     227         * Sequences specific to Gnome terminal
     228         */
     229        0,      KC_BACKSPACE,   0x7f, GSP_END, /* ASCII DEL */
     230        0,      KC_HOME,        0x1b, 0x4f, 0x48, GSP_END,
     231        0,      KC_END,         0x1b, 0x4f, 0x46, GSP_END,
     232
    218233        0,      0
    219234};
  • uspace/srv/hid/input/generic/gsp.c

    r333c233 rdcbb3ec  
    104104                if (key == 0) break;
    105105
    106                 /* Insert one sequence. */             
     106                /* Insert one sequence. */
    107107                rc = gsp_insert_seq(p, dp, mods, key);
    108108                if (rc != 0)
     
    197197
    198198        if (t == NULL) {
    199                 printf("gsp_step: not found\n");
     199                printf("gsp_step: not found, state=%d, input=0x%x\n",
     200                    state, input);
    200201                *mods = 0;
    201202                *key = 0;
     
    205206        *mods = t->out_mods;
    206207        *key = t->out_key;
     208
    207209        return t->new_state;
    208210}
Note: See TracChangeset for help on using the changeset viewer.