Re: [code] backspace again + translated strings

From: Niklas W <nikw.att.gmx.com>
Date: Wed, 13 Aug 2014 11:35:08 +0200

On Tue, 12 Aug 2014 08:33:52 -0400 (Eastern Daylight Time)
Mitchell <m.att.foicica.com> wrote:

> On Sun, 10 Aug 2014, Niklas W wrote:
> > The keycode in keypress() becomes 0, not 127...
>
> I'm honestly not sure what the problem is. I would think if the terminal
> is set up to emit 127 for backspace, then libtermkey (the library that
> interprets keypresses) should recognize it. How did you do the remapping?
> Perhaps I can try what you did and figure out the problem.

I tried every terminal emulator I have installed. All of them use 127 by
default, except maybe for xterm.

To detect which code is emitted, prefix the backspace key with Ctrl+v
(in a shell). It will print ^H for 8 and ^? for 127.

xfce4-terminal has a (gui) setting for it under "Compatibility".

With xterm you can add to your ~/.Xdefaults:

  xterm*VT100.translations: #override \
      <Key>BackSpace: string(0x7F)

or

  xterm*VT100.translations: #override \
      <Key>BackSpace: string(0x08)

and then reload the X resources:

$ xrdb -load ~/.Xdefaults # or -merge

and restart xterm.

> > 2) Some characters in localized UI strings doesn't show up right,
> > although I can type them fine. My locale is sv_SE.UTF-8.
>
> Which strings are they? Can you check the locale.sv.conf to ensure they
> are correct? Perhaps some characters got mangled over time.

It would seem to be all multibyte UTF-8 characters. Thanks Mitchell and
Joshua for confirming that the curses lib doesn't support UTF-8.

Regards
Niklas

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 13 Aug 2014 - 05:35:08 EDT

This archive was generated by hypermail 2.2.0 : Wed 13 Aug 2014 - 06:26:05 EDT