Pound sterling symbol in shell with UK keyboard layout - BSD

This is a discussion on Pound sterling symbol in shell with UK keyboard layout - BSD ; Hello I'm using a fresh install of FreeBSD 6.2 with a UK model IBM PS/2 keyboard. The keymap has been set to uk.iso.kbd and the '3' key which has Shift-3 set to character map 156 ( pound sterling) symbol However ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Pound sterling symbol in shell with UK keyboard layout

  1. Pound sterling symbol in shell with UK keyboard layout

    Hello

    I'm using a fresh install of FreeBSD 6.2 with a UK model IBM PS/2
    keyboard.

    The keymap has been set to uk.iso.kbd and the '3' key which has
    Shift-3 set to character map 156 ( pound sterling) symbol

    However when I type shift-3 in the console I never see the pound
    sterling symbol, it doesn't do anything, though it does work correctly
    in the 'edit' command editor.

    My keyboard is the classic IBM type M clicky model 1391406. I've tried
    just about everything.

    I'm using the # shell (bourne) - has anybody got it to work here or in
    any of the other shells?

    Thanks

    Yash


  2. Re: Pound sterling symbol in shell with UK keyboard layout

    Interesting problem. I too get a correct uk pound symbol in editors
    like vi, but if I hit shift-3 in an xterm (or other X11 terminal
    emulators) or on the console, I get a '#' followed by a linefeed.

    Under X11, running xev shows that X is correctly translating the keycode
    into the correct keysym and XmbLookupString returns the correct character,
    so it looks like the X11 event to keysym translation is set up right.

    However I do have a fix for X11, although this doesn't work for the console.
    The readline library uses an initialisation file called inputrc
    (man 3 readline for full details); you can define a global version
    in /etc/inputrc (and set the INPUTRC shell variable) or make a per-user
    copy in ~/.inputrc. After trying a few options I found that adding the
    following lines to ~/.inputrc gets my pound key working at the shell prompt,
    when running within an xterm:-

    # ~/.inputrc readline initialisation file
    # enable uk pound symbol
    set meta-flag on
    set input-meta on
    set convert-meta off
    set output-meta on
    # this is the key translation:-
    Meta-#: "\C-v"
    # end of ~/.inputrc

    Annoyingly this doesn't work on the console; it does change the character
    that is echoed when I hit shift-3, but not to the desired pound symbol
    (I get a lower-case 'u' with an acute accent over it).

    So I don't know how to fix it on the console, anyone else?

    -- Tony

+ Reply to Thread