Lisp HUG Maillist Archive

changing key-bindings

Hi, 

I'd like to ask you how to change default key-bindings on Lispworks.
I'd like to assign "delete previous character" to "Ctrl-h".

I read this tutorial:
http://www.lispworks.com/documentation/lw50/EDUG-M/html/eduser-m-129.htm#32041

I just need to put code in the initialization code as follows:

(editor:bind-key "Delete Previous Character " #("control-h"))

but I cannot solve this problem.

I'd appreciate your advice.

Re: changing key-bindings

On 2017-07-10 09:12 AM, Noguchi Hiroki wrote:
Hi, 

I'd like to ask you how to change default key-bindings on Lispworks.
I'd like to assign "delete previous character" to "Ctrl-h".

I read this tutorial:
http://www.lispworks.com/documentation/lw50/EDUG-M/html/eduser-m-129.htm#32041

I just need to put code in the initialization code as follows:

(editor:bind-key "Delete Previous Character " #("control-h"))

but I cannot solve this problem.

I'd appreciate your advice.

I put this in my ~/.lispworks file

(editor:bind-key "Delete Previous Character" "Ctrl-h" :global :emacs)

and it appears to work.

You appear to be using LW5 - the key names have changed between LW7 (what I'm using) and previous versions and this is unlikely to work for you.

Try running LW, bring up an editor window and hit ^H-b (list all key bindings).  This might give you a clue as to what the ^H key character name is (by default, it should be bound to "Help").

N.B. you will be removing a bunch of useful functions (like ^H-b) if you rebind ^H.

pt


Updated at: 2020-12-10 08:30 UTC