Ignore:
Timestamp:
May 20, 2006, 7:41:14 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Make the slang driver UTF-8 and UTF-32 aware.
  • Add the backspace key to the slang driver.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_slang.c

    r969 r970  
    276276
    277277    /* If the key was ASCII, return it immediately */
    278     if(intkey < 0x100)
     278    if(intkey < 0x80)
    279279    {
    280280        ev->type = CACA_EVENT_KEY_PRESS;
    281281        ev->data.key.ch = intkey;
     282        ev->data.key.utf32 = intkey;
     283        ev->data.key.utf8[0] = intkey;
     284        ev->data.key.utf8[1] = '\0';
    282285        return 1;
    283286    }
     
    316319        case SL_KEY_IC: ev->data.key.ch = CACA_KEY_INSERT; break;
    317320        case SL_KEY_DELETE: ev->data.key.ch = CACA_KEY_DELETE; break;
     321        case SL_KEY_BACKSPACE: ev->data.key.ch = CACA_KEY_BACKSPACE; break;
    318322        case SL_KEY_HOME: ev->data.key.ch = CACA_KEY_HOME; break;
    319323        case SL_KEY_END: ev->data.key.ch = CACA_KEY_END; break;
Note: See TracChangeset for help on using the changeset viewer.