ved key-mapping ? 
Author Message
 ved key-mapping ?

My xved operates OK.
And under X-windows, ved gives a 'split screen',
but keys are wrongly mapped.

Out of X-windows, ved has bad keys and bad layout.
Advice please.
-------------
poplog system installation and familiarisation via inet download is
a multistep process, with many stages that can fail.

More importantly is that failure is not detected due to the lack of
'test points'.

This is NOT a plug-n-play system.
Greatly increased numbers of test points need to be provided.

The AI approach of: we don't know all possibilities that could cause
errors, but we provide heuristics, to greatly increase the chance of
success; is appropriate.

Here are some novel bugs, which I really didn't want to meet:
1. Unix, MSDOS and my 'proper' OS (oberon) use different line
terminator combinations (CR,CR/LF,LF).
  Many editors provide a visual line break, for all cases without indicating
any difference.
The first line of #!/bin/csh   or  #!/bin/bash   scripts  fail (with out
indicating where the error lies) when the (invisible) line terminator
is not ) 0Dhex.    
2. Linux documentation refers to 'enviroment variables',
eg. $PATH, $EDITOR. These can be set and exported by a script; to be
confirmed on exit from the script.
$poplocal ... are confirmed as set inside the script, but not after exit.

Poplog's offer of multi:
  platforms, http or ftp, csh or bash, ved or xved ....has great advantages,
but massively adds to the 'decision load' of the first time installer.

The complications of Unix's multi-user/tasking further adds to the
points of possible error.

One (of several needed) test points would be the ability to
read/confirm the current set of enviroment variables, needed
by poplog.

The 'normal' enviroment variables are seen by: printenv
or save to file for later viewing by: printenv >  <fileName>.

Thanks,
  Chris Glur.



Fri, 01 Aug 2003 03:18:50 GMT  
 ved key-mapping ?
Chris,

Quote:

> Date: 11 Feb 2001 19:18:50 GMT
> Organization: The South African Internet Exchange

> My xved operates OK.
> And under X-windows, ved gives a 'split screen',

If you don't run Xved, then ved runs with either a half or a full
screen toggled by ESC w, whether it is in the X window system
or not (e.g. could be a telnet window logged in from a remote
PC).

See TEACH buffers

Which introduction to Ved did you read?

Quote:
> but keys are wrongly mapped.

What's the definition of right map?

If you are running Ved in an Xterm window then the mapping will
depend on the Xterm's defaults. You can change them -- as we do here
in a Xdefaults file which (on our system) is read when X starts
up.

You can get the settings we use if you have fetched the
    setup.tar.gz

file. Read the AREADME file.

Otherwise try fetching this:

    http://www.cs.bham.ac.uk/research/poplog/setup/Poplib/Xdefaults.poplog

You can make those definitions active by doing

    xrdb -merge Xdefaults.poplog

(It is included in the setup/bin/poplog script).

That file has the defaults we use for both dumb Ved and Xved here in
Birmingham. The function key bindings for both are then (usually,
depending on what sort of keyboard you have!!!) those defined in
this file:

    http://www.cs.bham.ac.uk/research/poplog/help/vedncdxtermkeys

But I can't recall whether you need some additional libraries,
included in
    bhamteach.tar.gz

If you know what character sequences your function keys transmit,
you can do a lot more tailoring in your vedinit.p file in your
$poplib directory, as explained in HELP initial

E.g. if you find the the BACKSPACE key deletes the character under
the cursor, or just moves left one space (which is what backspace
was originally defined to do on old typewriters, etc.) and the DEL
key deletes the key just typed (i.e. to the left of the cursor) then
you can swap them round by putting this in your vedinit.p file:

    vedset keys

        dotdelete = del
        chardelete = bs

    endvedset;

Because of my history I prefer them the other way round, since DEL
was originally "delete character just typed" and Backspace meant
move character left without changing anything. That was before there
were arrow keys!

But I agree that the default should be changed to suit the newer
convention most people have now got used to.

Quote:
> Out of X-windows, ved has bad keys and bad layout.

Can you be more specific about what you actually get and what you
don't like about it?

What sort of keys and layout do you want.

What's "bad" for one  person may be excellent for another.

Quote:
> Advice please.
> -------------
> poplog system installation and familiarisation via inet download is
> a multistep process, with many stages that can fail.

Yes: it still needs a lot of work.

This is one reason I would like (one day) to change the defaults to
work as we have set them up here. It is all fairly straightforward
and all our beginners seem to find them acceptable.

(I begin to wonder how much opposition of new users to Ved at some
other places had to do with the variety of inconsistent conventions
in use there?)

Quote:
> More importantly is that failure is not detected due to the lack of
> 'test points'.

> This is NOT a plug-n-play system.
> Greatly increased numbers of test points need to be provided.

Yes.

(Actually I think the PC windows/NT version is more like a plug and
play version to suit what users of windows are accustomed to.
But the lack of graphics rules that out for many uses.)

Quote:
> Here are some novel bugs, which I really didn't want to meet:
> 1. Unix, MSDOS and my 'proper' OS (oberon) use different line
> terminator combinations (CR,CR/LF,LF).

If you read and write the same files on different systems you will
have problems.

I think PC windows Ved by default writes new files to fit the
microsoft convention, and I think that on reading files it
interprets using the unix convention (LF -> CR+LF).

Quote:
>   Many editors provide a visual line break, for all cases without indicating
> any difference.

And what do they do if they write a file on Windows and then later
read it on unix? Or vice-versa.

There are unix tools to convert whole files between conventions. I
forget what they are since I use only unix, and if I get a PC file
I convert it in VED with
    ENTER sgs/\r//

Quote:
> The first line of #!/bin/csh   or  #!/bin/bash   scripts  fail (with out
> indicating where the error lies) when the (invisible) line terminator
> is not ) 0Dhex.

Under Unix and linux the terminator should be 16:0A = LF with no CR

Quote:
> 2. Linux documentation refers to 'environment variables',
> eg. $PATH, $EDITOR. These can be set and exported by a script; to be
> confirmed on exit from the script.

Not if you RUN the script. Only if you SOURCE it.

Also it's important to remember the two families of shell scripts
use quite different conventions

C-type shells:
    csh, tcsh
            setenv PATH ....

Other (bourne-type) shells:
    sh ksh bash
            PATH=....
            export  ....

I normally use the csh/tcsh type, and so I write scripts using
setenv, etc.

Other people (e.g. most linux users) prefer bash

On your linux system try

    man tcsh

    man bash

if you want to learn the differences!

Poplog mostly provides scripts for csh/tcsh by default but often has
alternatives of the second type with .sh as suffix, e.g. these
startup files:

    $usepop/pop/com/poplog
    $usepop/pop/com/poplog.sh

    $usepop/pop/com/popenv
    $usepop/pop/com/popenv.sh

But not all have been supplied in both forms. E.g. this exists for
creating the startup.psv saved image
    $usepop/pop/com/mkstartup

but not
    $usepop/pop/com/mkstartup.sh

Quote:
> $poplocal ... are confirmed as set inside the script, but not after exit.

If you RUN a script, the environment variables NEVER survive on
exit. (They act like local variables).

If you SOURCE a script (i.e. treat it as if you had typed all its
contents into your current shell)

csh/tcsh:
    source <script>

sh/ksh/bash
    . <script>

then the csh/tcsh uses of

    setenv

will survive. But uses of "=" to set environment variables
will not survive if you use sh/ksh/bash, unless you also
explicitly "export" them.

Since you don't say what you are doing it is hard to know what
the problem is.

Quote:
> Poplog's offer of multi:
>   platforms, http or ftp, csh or bash, ved or xved ....has great advantages,
> but massively adds to the 'decision load' of the first time installer.

Which shell are you using?

If you get the setup.tar.gz package from the bham site, mentioned in
a previous message, it includes a script for running pop11, Ved,
Xved, prolog, etc. that can be used no matter what shell you use
because you can run it instead of sourcing it, e.g.

    poplog pop11
    poplog xved

It has been tried successfully in several configurations (suns,
linux PC, DEC Alpha).

You don't have to set ANY environment variables to use it.

You don't say whether you have tried that. I tried to make the
instructions very simple:

    http://www.cs.bham.ac.uk/research/poplog/setup/AREADME

Quote:

> The complications of Unix's multi-user/tasking further adds to the
> points of possible error.

> One (of several needed) test points would be the ability to
> read/confirm the current set of enviroment variables, needed
> by poplog.

If you use the above setup package and the poplog script it is all
automated. (There's a very slight efficiency cost).

There may be a residual problem tailoring Ved and Xved keyboard
settings.

The setup package includes a Poplib subdirectory which includes

    Xdefaults.poplog

which helps to set everything up consistently for both Ved and
Xved.

But you can use the vedset construct in your own
$poplib/vedinit.p file to tailor key bindings, because
keyboards differ so much.

Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK

PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html



Sat, 02 Aug 2003 06:12:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ved key-mapping to conventional use.

2. Ved keys in Windows

3. Running Ved from Ved

4. ASCII key mapping

5. problem with HP Xterminal key mappings in XVED

6. RCR: key value mapping for sprintf/%

7. ncsim command line mode - repeat history, key map problem

8. ncsim command line mode - repeat history, key map problem

9. MAPPING OF FUNCTION KEYS in cobol fujitsu

10. Q: COBOL Key Mapping Package for vt220 and SVR4

11. Map Values to Keys?

12. Abstract Object Interface, Mapping, Keys(), etc.

 

 
Powered by phpBB® Forum Software