benjaminor / kkp

Emacs support for the Kitty Keyboard Protocol
GNU General Public License v3.0
32 stars 6 forks source link

Issue about "key sequece" when open org file. #3

Closed bommbo closed 1 year ago

bommbo commented 1 year ago

Some message display in minibuffer when open org file . Just org file.
Screenshot from 2023-03-20 20-18-52

version

GNU Emacs 29.0.60 kitty 0.27.1

configuration

(require 'use-package)
(use-package kkp)
(use-package meow)
(require 'kkp)
(global-kkp-mode 1)
(require 'meow)
(meow-global-mode t)
bommbo commented 1 year ago

and without meow.

open other file

C-h l

ESC [ ? 0 u ESC [ 1 0 4 ; 5 u l ;; view-lossage

open org file

C-h l

ESC [ ? 0 u ESC [ ? 0 u ESC [ 1 0 4 ; 5 u l ;; view-lossage

emacs -nw -q test.org

C-h l C-h l ;; view-lossage
or
C-h C-h l ;; view-lossage
or
C-h l ;; view-lossage
benjaminor commented 1 year ago

Hi, this is because meow resets the keybinding for "\e" ([27]) in input-decode-map to some custom map (https://github.com/meow-edit/meow/blob/d80c2ff2f94333492dd7714c4210440162985b20/meow-esc.el#L42-L49). This interferes with kkp and frankly with a lot of other terminal-related input.

I'm not sure why they do it, but I'd suggest you can open an issue there and propose they use a different keymap to remap the ESC key, IMO the key-translation-map would be better suited (https://www.gnu.org/software/emacs/manual/html_node/elisp/Translation-Keymaps.html). Until then I'm afraid kkp and meow won't be compatible.

DogLooksGood commented 1 year ago

Try disable meow-esc-mode.

bommbo commented 1 year ago

Try disable meow-esc-mode.

yeah... It's fine.

bommbo commented 1 year ago

It's my configuration for this issue.

(add-hook 'org-mode-hook
          (lambda ()
        (meow-esc-mode -1)))