Thread: ncurses Strange Keys

  1. #1
    Registered User
    Join Date
    Aug 2009

    ncurses Strange Keys

    In my ncurses text editor, when the user presses Backspace, the program gets the Delete key, and if the user presses Delete, it gets the character 'J'. Does anyone have an idea why?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Use the internets, Luke!

    Curses Problem in Detecting Backspace

    Something like that perhaps?

    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Aug 2009
    stty says that backspace is mapped to 0x08
    xev shows that backspace is 0x08 and deleter is 0x7f

    That seems right so I still can't find the problem.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Post a small ncurses program to print out BS/Del input.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simulate Keys with a Keyboard Hook
    By guitarist809 in forum Windows Programming
    Replies: 3
    Last Post: 11-14-2008, 08:14 PM
  2. blocking or passing keys with global hook
    By pmouse in forum Windows Programming
    Replies: 4
    Last Post: 08-29-2007, 02:54 PM
  3. Function keys and strange results
    By divineleft in forum Linux Programming
    Replies: 3
    Last Post: 11-12-2006, 06:39 AM
  4. Strange results using dnsapi and windns
    By Niara in forum Networking/Device Communication
    Replies: 3
    Last Post: 08-13-2005, 10:21 AM
  5. Strange Direct Input Behaviour
    By Diamonds in forum Windows Programming
    Replies: 2
    Last Post: 06-23-2003, 04:34 PM