ergoemacs in terminal mode breaks keybingings for arrows, functional keys
Closed this issue · 4 comments
kirill-lapshin commented
There are number of old issues on this topic, e.g. #280.
I'm accessing Linux machine from windows via Git bash, putty and run emacs in terminal (not X).
- If I start emacs without config (emacs -Q) arrows work
- After issuing (require 'ergoemacs-mode) in scratch buffer they stop working and instead print out letters, e.g. A for arrow up, B for arrow down
Tested in both git bash and putty. Arrow behaviour is the same in both.
For functional keys same experiment produces different results. In git bash functional keys are broken same way as arrows, but they work fine in putty even after loading ergoemacs.
Using emacs 27.1 and recent ergoemacs from github.
mattfidler commented
This should be fixed in the github version.
berkeleynerd commented
Using the github version I am still encountering this issue. I'm using ksh and xterm on OpenBSD 7.0
boykov commented
@mattfidler I think when
check is unnecessary here
(defun ergoemacs-fix-arrow-keys (keymap)
"Fix arrow keys for KEYMAP."
(let (ergoemacs-M-O-binding)
(when ergoemacs-M-O-binding
(setq ergoemacs-M-O-binding (lookup-key keymap (kbd "M-O")))
(define-key keymap (kbd "M-O") 'ergoemacs-handle-M-O)
(define-key keymap [ergoemacs-meta-O] ergoemacs-M-O-binding))))
The variable ergoemacs-M-O-binding
is always nil
due to let
statement.
I removed it and the function works now.
mattfidler commented
Thanks @boykov
Removed