Subject: mailing-list for TeXmacs Users
List archive
From : Miguel de Benito Delgado <address@hidden>- To: address@hidden
- Cc: "address@hidden" <address@hidden>
- Subject: Re: [TeXmacs] scheme functions for keyboard input
- Date: Thu, 30 Jan 2014 15:29:15 +0100
Hi,
On Thu, Jan 30, 2014 at 8:08 AM, Scott Michael Sullivan <address@hidden> wrote:
Is there a way in scheme to read input from the keyboard, while not adding anything to the texmacs buffer? I'm trying to write functions which can redefine keyboard maps on the fly, and I require this sort of functionality.
Keyboard events are captured by c++ code (especifically by QTMWidget if you are using the Qt port, then sent to editor_rep::handle_keypress()) and redirected to the scheme handlers "keyboard-press". You can search in the scheme code for examples of how you may use contextual overloading to handle keypresses only when the editor is in a particular state or "mode" (e.g. while in "search mode" keypresses are handled differently: they produce no output in the editor but instead are interpreted as part of the search string)
However, if you want to set keyboard maps then you may skip the low level stuff and use kbd-map and all the related infrastructure. Just look for the definition of kbd-map and around it you'll find lots of related interesting stuff.
Best,
--
Miguel de Benito.
Miguel de Benito.
- [TeXmacs] scheme functions for keyboard input, Scott Michael Sullivan, 01/30/2014
- Re: [TeXmacs] scheme functions for keyboard input, François Poulain, 01/30/2014
- Re: [TeXmacs] scheme functions for keyboard input, Miguel de Benito Delgado, 01/30/2014
- Re: [TeXmacs] scheme functions for keyboard input, Scott Michael Sullivan, 01/30/2014
- Re: [TeXmacs] scheme functions for keyboard input, François Poulain, 01/31/2014
- Re: [TeXmacs] scheme functions for keyboard input, Scott Michael Sullivan, 01/30/2014
Archive powered by MHonArc 2.6.19.