🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Eric Law -- admin Wed, 12 May 1993 15:14
Epoch Keypad Rebind problem under SunOS 4.1.3
#766
Author: Eric Law -- admin
Date: Wed, 12 May 1993 15:14
56 lines
2582 bytes
Summary:
    Cannot rebind escape sequences to Keysyms for Epoch
    under SunOS 4.1.3

Greetings,

    We are using Epoch 4.2 running on various
    Sun Workstations with OpenWindows 3.0 and SunOS 4.1.3
    We used the standard sun compiler /usr/ucb/cc

    In order to force the right-hand keypad to emit the
    proper escape codes for a VT100, we used xmodmap to
    assign KP_* keysyms to each keycode on the keypad.

    >   keycode 78  = KP_Subtract
    >   keycode 132 = KP_Add

    In our ~/.emacs file, we call rebind-key to assign the
    proper escape code to each keysym.

    >   (epoch::rebind-key "KP_Subtract" 0 "Om")
    >   (epoch::rebind-key "KP_Add"      0 "Ol")

    In a loaded lisp file (.el) we call define-key to
    call emacs functions based on what escape codes we find.

    >   (define-key global-map "\eOm" 'edt-delete-line)
    >   (define-key global-map "\eOl" 'edt-delete-word)

    Once in Epoch however, the KP_* keys emit single digits
    and simple symbols for each key.  It is as if the keypad
    were in numeric keypad mode, not application mode.

    >   Pressing KP_Subtract results in '-' not '^[Om' as expected
    >   Pressing KP_Add      results in '+' not '^[Ol' as expected

    My only guess as to what the problem might be is that
    Epoch is calling XLookupString for the key pressed
    and, if there already is a string associated with that
    key, use it instead of the rebinding done in the ~/.emacs
    file. Is this true ?

    This problem does not occur under SunOS 4.1.1b
    and OpenWindows 3.0

    *Any* information you can provide would be greatly appreciated
    Thank You for your time

Eric S. Law
Computer Resources Group
Commodore Business Machines
1200 Wilson Drive
West Chester, PA 19380
(215) 431-9496
ericl@commodore.com
Re: Epoch Keypad Rebind problem under SunOS 4.1.3
#772
Author: Ian Flanigan
Date: Wed, 19 May 1993 03:30
27 lines
1460 bytes
In article <9305121414.AA29319@crunch> ericl@crunch.commodore.com (Eric Law -- admin) writes:
>
>Summary:
>    Cannot rebind escape sequences to Keysyms for Epoch
>    under SunOS 4.1.3
>
>    [...]
>
>    This problem does not occur under SunOS 4.1.1b
>    and OpenWindows 3.0

Try rebinding the first symbol that appears in the xmodmap -pk dump.
For example, the line for home on my Type 4 keyboard is:

     75         0xffd8 (F27)    0xffd8 (F27)    0xffb7 (KP_7)   0xff50 (Home)

So do the binding:

     (rebind-key "F27" nil "\M-<")           ; Make "Home" go to top of buffer

I've re-bound "Home", "PgUp", etc. this way.  Itza verra nysh.

-- 
Ian Flanigan

Washington University in St. Louis	"You can never have too many napkins."
flan@arl.wustl.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads