[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Best way to intercept terminal escape sequences?
From: |
Eli Zaretskii |
Subject: |
Re: Best way to intercept terminal escape sequences? |
Date: |
Fri, 27 Aug 2010 18:40:44 +0300 |
> Date: Fri, 27 Aug 2010 16:44:12 +0200
> From: Ryan Johnson <address@hidden>
>
> Is there really no other way to do this?
You could use the :post-read-conversion attribute of a coding-system.
That is, define a new coding-system that has this attribute specifying
a function you will write. That function will first decode the mouse
stuff, and then decode the rest by the terminal-coding-system set by
the user.
You can see an example of this in ctext-with-extensions. It is
defined on mule-conf.el and its post-read-conversion function is
defined on mule.el.
Other than that, it's no surprise that this is not easy: we ask Emacs
to read keyboard input that is encoded in two different encodings,
which is not how keyboard input was designed.
I think the only way that is easier and cleaner would be if Emacs
could read the mouse input from a separate file descriptor. We could
then set that file descriptor to use a different encoding. Of course,
that would need low-level changes in Emacs, even if it is possible in
xterm.
- Best way to intercept terminal escape sequences?, Ryan Johnson, 2010/08/26
- Re: Best way to intercept terminal escape sequences?, Ryan Johnson, 2010/08/27
- Re: Best way to intercept terminal escape sequences?, Ryan Johnson, 2010/08/27
- Re: Best way to intercept terminal escape sequences?,
Eli Zaretskii <=
- Re: Best way to intercept terminal escape sequences?, Stefan Monnier, 2010/08/27
- Re: Best way to intercept terminal escape sequences?, Ryan Johnson, 2010/08/28
- Re: Best way to intercept terminal escape sequences?, Stefan Monnier, 2010/08/28
- Re: Best way to intercept terminal escape sequences?, Ryan Johnson, 2010/08/28
- Re: Best way to intercept terminal escape sequences?, Ryan Johnson, 2010/08/31