Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

THE on Linux: Limited Key Definitions

Help
PD_Martin
2008-08-05
2013-05-23
  • PD_Martin
    PD_Martin
    2008-08-05

    I'm having problems defining many keys within THE (3.2?).  For example, CTRL-CURUp will "show" as S-A so any assignments I do to CTRL-CURUp are just lost.  I have also installed XTHE (3.3B3), which allows me to define the keys just fine.

    I am new to Linux (just installed latest version of UBUNTU) and have probably goofed the installation process.  I have tried letting Ubuntu's synaptic package manager grab THE and Curses as well installing XTHE, XCurses, and Regina separately.

    Ubuntu performed the installation of THE without a hitch; but I have the key definition issues defined above.

    When I installed XTHE, XCurses and Regina separately I had a problem with the final stage (?) of XTHE which complained about not being able to find a library (-lfl).  I re-entered the line at the command prompt (minus the -lfl switch) and built the XTHE executable.

    XTHE seems to work fine with a couple of exceptions: 1) it crashes when I resize the window "moderately" from the startup window size (going from 100x40 to 100x50 causes a crash; as does the reverse), and 2) it doesn't seem to recognize the mouse.

    Either version (THE or XTHE) would work great for me if I can get these issues ironed out, so any comments would be appreciated.

    On a trivial aside, is their a recommended way for defining the "tab" key to insert spaces instead of just positioning the cursor?

    Pat

     
    • James
      James
      2009-02-12

      Easy answers first.  The "-lfl" should be the library of FLEX, which is a lexical analyzer generator.  Should be included in most Linux distributions as an optional package.

      I think putting "set tabkey tab tab" in your .therc file fixes the tab problem. 

      I've never found a really good solution to the key definition problem, and usually have to mess around every time I upgrade OS or THE.  What I have now is a lot of lines in my .xDefaults file that define key translations for xterm.  I'll try to copy them here (the formatting's seriously messed up, and ignore the leading digits, as they're the THE prefix field):

      00005 .xterm.vt100*translations:   #override \ 00006                         <Key>Delete:    string(0x1b) string("[3~")  \n\ 00007 Ctrl                    <Key>Home:      string(0x1b) string("[414z") \n\ 00008 Ctrl                    <Key>Up:        string(0x1b) string("[415z") \n\ 00009 Ctrl                    <Key>Prior:     string(0x1b) string("[416z") \n\ 00010 Ctrl                    <Key>Left:      string(0x1b) string("[417z") \n\ 00011 Ctrl                    <Key>Right:     string(0x1b) string("[419z") \n\ 00012 Ctrl                    <Key>End:       string(0x1b) string("[420z") \n\ 00013 Ctrl                    <Key>Down:      string(0x1b) string("[421z") \n\ 00014 Ctrl                    <Key>Next:      string(0x1b) string("[422z") \n\ 00015 Ctrl                    <Key>Delete:    string(0x1b) string("[423z") \n\ 00016 Ctrl                    <Key>Tab:       string(0x1b) string("[1z") \n\ 00017 Shift                   <Key>Tab:       string(0x1b) string("[1z") \n\ 00018 Shift                   <Key>F1:        string(0x1b) string("[324z") \n\ 00019 Shift                   <Key>F2:        string(0x1b) string("[325z") \n\ 00020 Shift                   <Key>F3:        string(0x1b) string("[326z") \n\ 00021 Shift                   <Key>F4:        string(0x1b) string("[327z") \n\ 00022 Shift                   <Key>F5:        string(0x1b) string("[328z") \n\ 00023 Shift                   <Key>F6:        string(0x1b) string("[329z") \n\ 00024 Shift                   <Key>F7:        string(0x1b) string("[330z") \n\ 00025 Shift                   <Key>F8:        string(0x1b) string("[331z") \n\ 00026 Shift                   <Key>F9:        string(0x1b) string("[332z") \n\ 00027 Shift                   <Key>F10:       string(0x1b) string("[333z") \n\ 00028 Shift                   <Key>F11:       string(0x1b) string("[334z") \n\ 00029 Shift                   <Key>F12:       string(0x1b) string("[335z") \n\ 00030 Ctrl                    <Key>F1:        string(0x1b) string("[424z") \n\ 00031 Ctrl                    <Key>F2:        string(0x1b) string("[425z") \n\ 00032 Ctrl                    <Key>F3:        string(0x1b) string("[426z") \n\ 00033 Ctrl                    <Key>F4:        string(0x1b) string("[427z") \n\ 00034 Ctrl                    <Key>F5:        string(0x1b) string("[428z") \n\ 00035 Ctrl                    <Key>F6:        string(0x1b) string("[429z") \n\ 00036 Ctrl                    <Key>F7:        string(0x1b) string("[430z") \n\ 00037 Ctrl                    <Key>F8:        string(0x1b) string("[431z") \n\ 00038 Ctrl                    <Key>F9:        string(0x1b) string("[432z") \n\ 00039 Ctrl                    <Key>F10:       string(0x1b) string("[433z") \n\ 00040 Ctrl                    <Key>F11:       string(0x1b) string("[434z") \n\ 00041 Ctrl                    <Key>F12:       string(0x1b) string("[435z") \n\ 00042                         <BtnUp>:        select-end(SELECT, CUT_BUFFER0, CLIPBOARD) \n