Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] scheme functions for keyboard input

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] scheme functions for keyboard input


Chronological Thread 
  • From: François Poulain <address@hidden>
  • To: address@hidden
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] scheme functions for keyboard input
  • Date: Fri, 31 Jan 2014 09:59:40 +0100

Hi Scott,

Le Thu, 30 Jan 2014 15:41:45 -0700,
Scott Michael Sullivan <address@hidden> a écrit :

> I've already figured out how to set static keyboard maps, but I would
> really like to create dynamic keymaps. For example, suppose I wanted
> to map the pauli matrices to M-x, M-y, and M-z during a texmacs
> session, without opening the Guile interpreter (obviously I would
> also need to set aside a shortcut for mapping, let's call it "C-m").
> I want a function where I could type out the x-matrix, select it,
> type "C-m M-x <enter>", and from now on in this session, typing "M-x"
> creates the x-matrix. This type of dynamic mapping is only one
> example of what I have in mind.

TeXmacs mappings can be restricted to a predicate evaluated in real
time, making them "contextually overloaded". I think this fit your
needs, in a more functionnal way (in the sense that you don't need
boards effects, like changing global shortcuts runtime, to get the
wanted behavior).

This could looks like:
(kbd-map
(:require (inside? 'a-well-suited-texmacs-tag))
("M-x" (make 'x-matrix)))

François

--
François Poulain <address@hidden>



Archive powered by MHonArc 2.6.19.

Top of Page