Ihor Radchenko <[email protected]> writes:

cpj <[email protected]> writes:

* org-export--dispatch-action reads keys with read-event.
* On the NS/macOS build, the Delete/Backspace key yields the symbol backspace. * The dispatcher advertises DEL, but its navigation loop accepts only character 127.
* read-key correctly produces 127.
* Adding this pcase clause fixes it:
  ('backspace ?\177)

I think the right fix is changing `org-scroll'

Adding support for the key 'backspace in `org-scroll' would be very easy to do but I wonder if it's actually correct.

Backspace seems to correspond the ASCII escape ?\b which also corresponds to "C-h". I wonder if there is the possibility of a user trying to send "C-h" for help but we interpret it as DEL.

The docstring of "read-event" seems to imply it's a pretty low level function and that we should consider using "read-key" instead as that decodes events using "input-decode-map".

I can't quite follow the logic but I think using "read-key" would respect user settings like "normal-erase-is-backspace" whereas "read-event" would not.

On my system running the following and then hitting my backspace key results in the following:

(read-event "blah:") => backspace

(read-key "blah:") => 127

So at least on my system, switching from "read-event" to "read-key" would fix this.

Maybe I'm overthinking this. IDK. What do you think?

Reply via email to