Support for usual control keys in the Joe editor?

Posted on

Problem :

The Joe editor seems the closest command-line equivalent to Notepad on Linux.

However, by default, it doesn’t seem to support those keys:

  • CTRL-C/CTRL-V for copy/pasting
  • The Home/End keys don’t work
  • The PageUp/PageDown just scroll what’s in the terminal window (SecureCRT) instead of scrolling within the document currently edited in Joe

If some experienced Joe user reads this, are those keyboard shortcuts definitely not supported on Joe and I must get used to the Wordstar shortcuts, or are they available by editing its configuration file?

Thank you.


Edit : After logging on directly to the Linux host, I notice that the Home/End and PageUp/Down do work. So the issue is getting those to work over a terminal application from Windows.

Solution :

Joe’s Own Editor home page lists this capability:

Multiple interactive keyboard macros.
Macros can be assigned to key
sequences in joerc file.

The man page says :

You can customize the keyboard layout,
the help screens and a number of
behavior defaults by copying JOE’s
initialization file (usually
/home/jhallen/etc/joe/joerc) to .joerc
in your home directory and then by
modifying it. See the section joerc
below.

This section joerc says:

The joerc file

^T options, the help screens and the
key-sequence to editor command
bindings are all defined in JOE’s
initialization file. If you make a
copy of this file (which normally
resides in
/home/jhallen/etc/joe/joerc) to
$HOME/.joerc, you can customize these
setting to your liking. The syntax of
the initialization file should be
fairly obvious and there are further
instruction in it.

So just follow the above instructions to construct your own $HOME/.joerc

A closer equivalent of notepad would be nano: both have only extremely basic features. They don’t have the same keyboard shortcuts though.

Joe’s keyboard shortcuts are fully configurable. In fact the default shortcuts are defined in the system configuration file, typically found in /etc/joe/joerc or some similar place. Joe comes with several alternative “skins” such as wordstar, pico and emacs. You could write a configuration file for a CUA skin (but look around first to see if someone’s already done it).

To find out what keys like Home and End send, type (in joe) Ctrl+Q followed by the key. Most function keys send the escape character followed by a few printable characters; the Ctrl+Q causes the escape character to be inserted literally, replace it by the two characters^[ in a joe key binding declaration.

For PgUp and PgDn, it sounds like your terminal emulator is intercepting those, so you’ll have to configure it if you want them to be passed to joe.

Leave a Reply

Your email address will not be published. Required fields are marked *