Topic: Configuring the ESC key (1 of 3), Read 18 times
Conf: Keyboard, keystroke macros
From: Pauli Lindgren
Date: Wednesday, January 02, 2008 09:00 AM

Is it possible to configure the operation of ESC key?

There is a line for Esc key in the key configuration file (vedit.key).
However, if I change it, it has no effect. Esc key always opens the pop-up menu.

Then I found information about the command Escape_Mode().
However, it only allows using Edit Function Codes (single numeric value).
What I need is to use macro language commands (as it is possible with other keys).

Configuring Esc key is needed for implementing vi emulation.

--
Pauli

 


Topic: Re: Configuring the ESC key (2 of 3), Read 18 times
Conf: Keyboard, keystroke macros
From: Ted Green
Date: Thursday, January 03, 2008 07:59 PM

At 09:01 AM 1/2/2008, you wrote:
>From: "Pauli Lindgren"
>
>Is it possible to configure the operation of ESC key?
>
>There is a line for Esc key in the key configuration file (vedit.key).
>However, if I change it, it has no effect. Esc key always opens the pop-up menu.
>
>Then I found information about the command Escape_Mode().
>However, it only allows using Edit Function Codes (single numeric value).
>What I need is to use macro language commands (as it is possible with other keys).
>
>Configuring Esc key is needed for implementing vi emulation.

While VEDIT does most of its own keyboard processing in the Windows version, the Esc key is semi-hardwired in Windows and we don't allow it to be reprogrammed. (Ditto with Enter and to some extent with F1 for Help.)

VEDIT 3.7 had vi emulation. I worked several months on implementing it, and this feature also gave no ROI. Only a few people ever used it and then wanted ever more vi details implemented. Therefore, I never implemented the vi emulation in the new VEDIT 4.0 macro language.

Sorry, but I have no interest in pursuing this as it would not be worth the effort.

Ted.

 


Topic: Re: Configuring the ESC key (3 of 3), Read 19 times
Conf: Keyboard, keystroke macros
From: Pauli Lindgren
Date: Friday, January 04, 2008 12:03 PM

On 1/3/2008 7:59:00 PM, Ted Green wrote:
>
>While VEDIT does most of its own keyboard processing in the
>Windows version, the Esc key is semi-hardwired in Windows
>and we don't allow it to be reprogrammed. (Ditto with
>Enter and to some extent with F1 for Help.)

But the Esc key IS configurable with Escape_Mode(). Only none of the possible configuration settings are useful (except perhaps Visual Exit).

Reconfiguring Enter key would be useful, too. Then we could have intelligent auto indent done automatically after pressing Enter (by calling my C_indent.vdm macro).
Or better still if it could be called from template editing macro. Then it could be file type specific.

BTW, it would be nice to be able to call c_indent.vdm automatically after block copy, too.

>
>VEDIT 3.7 had vi emulation. I worked several months on
>implementing it, and this feature also gave no ROI.
>Only a few people ever used it and then wanted ever more vi
>details implemented.
>Therefore, I never implemented the vi emulation in the new
>VEDIT 4.0 macro language.
>
>Sorry, but I have no interest in pursuing this as it would
>not be worth the effort.

I had forgotten about the macro language change. So vi emulation was only done with old macro language? That explains why it is no more available.
But I don't remember seeing vi emulation in DOS version, only in Unix version.

I recall it was said that Unix versions of Vedit could emulate vi 100%? So that was not true then?

Anyway, I have spent a couple of evenings doing vi emulation, and it is quite usable already. All the most common functions have been implemented and work OK. Only I have to use key F12 to switch to command mode, instead of Esc.

I found a work-around that makes it possible to use Esc key. When entering input mode, I call a macro that contains these lines:

Escape_Mode('V'+'E'*256)
Visual
Key_Load("vi_cmd.key")
Statline_Message("Command mode")
Return

However, this makes it impossible to call any keyboard macros (that contain [VISUAL EXIT]) while in input mode.

--
Pauli