meow icon indicating copy to clipboard operation
meow copied to clipboard

Meow does not work correctly with custom-mode

Open ahyatt opened this issue 6 months ago • 8 comments
trafficstars

If you try to type in text fields in a customization buffer (for example, M-x customize-face for default, then change the font family), Meow doesn't type correctly. For example, a space will turn on keypad mode, and another space will then insert a space. j will, for me, go up a line instead of typing a "j", etc.

Probably what should happen is that meow should disable itself for this mode.

ahyatt avatar May 06 '25 16:05 ahyatt

Since by default, motion-mode is enabled for the Custom mode, if you want to type correctly in a field, you need to switch to normal-mode.

capfredf avatar May 16 '25 15:05 capfredf

In a field, if you press, for example "i", or "a", it will not switch to normal-mode, it will actually type those out.

ahyatt avatar May 17 '25 00:05 ahyatt

It is just those keys are not bound to any special commands in the motion mode by default

capfredf avatar May 18 '25 20:05 capfredf

Even if those keys are bound, it will just type them out in a customization field. Are you seeing different behavior?

ahyatt avatar May 20 '25 18:05 ahyatt

Yes. usually there are only a few keys mapped in the motion mode. What is your code to set up the motion mode keybindings?

Also, if you do something like

  (defun echo-hello ()
    (interactive)
    (message "hello"))

and add '("i" . echo-hello) to your call to meow-motion-define-key, can you still type out i in a custom field?

capfredf avatar May 20 '25 19:05 capfredf

In a field, if you press, for example "i", or "a", it will not switch to normal-mode, it will actually type those out.

I was not clear. What I meant is by M-x meow-normal-mode.

capfredf avatar May 20 '25 19:05 capfredf

Yes, using M-x meow-normal-mode works, thanks; but I feel it shouldn't be necessary in this case.

For motion mode, just like the suggested setup I have j and k mapped:

(meow-motion-overwrite-define-key
     '("j" . meow-next)
     '("k" . meow-prev)
     '("<escape>" . ignore))

About these keys, I was wrong. These won't type out in a customization field. For example, I can go up and down with j and k through a field, but other keys will type in there, which isn't expected.

ahyatt avatar May 20 '25 21:05 ahyatt

you can change the default state to normal state for custom-mode by modifying meow-mode-state-list

capfredf avatar May 28 '25 15:05 capfredf