[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Best way to intercept terminal escape sequences?
From: |
Stefan Monnier |
Subject: |
Re: Best way to intercept terminal escape sequences? |
Date: |
Fri, 27 Aug 2010 01:03:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> all encoded events of some sort. For example, the xterm escape sequence
> "ESC O D" is eventually converted to <right>, but anybody calling
> read-char or read-event will get a string of characters instead (and
> probably wish they hadn't).
Yes, that's why they should use `read-key' instead.
> This is why xt-mouse can't do full mouse handling -- mouse-drag-track
> (mouse.el) calls read-event to watch for the mouse-up event.
And indeed, mouse-drag-track should also use read-key, IIUC.
But read-key is brand new, so a lot of code needs to be adapted to
use it. Patches welcome.
> Problems like this could be solved by allowing the system to process
> terminal escape sequences early in the food chain (= before read-char
> and read-event).
Packages like, ahem, xt-mouse.el need lower-level access, so we have to
keep lower-level primitives.
Stefan