[Gllug] Pound sign!

Nix nix at esperi.org.uk
Thu May 25 18:44:44 UTC 2006


On Thu, 25 May 2006, Richard Jones wrote:
> On Wed, May 24, 2006 at 08:44:45PM +0100, Nix wrote:
>> What does `C-h l' (`view-lossage') report you have pressed when you
>> hit that key?
>> 
>> (A good way to track it down is to hit the problematic key a few dozen
>> times, and then look at C-h l. If the key got through at all, the long
>> sequence of repeats should stick out a mile.)
> 
> OK, so I'm not sure what this is supposed to mean, but I see:
> 
>   M-B M-# C-h l

Probably the M-# is what it's actually sending (hit it several times to
be sure). This makes it all the more likely that a locale problem is your
real problem, but M-# isn't bound to anything much (`calc-dispatch')
normally, so we can steal it easily.

The M-B is probably the result of you going back a word right before?

(This is just a guess.)

>> Once you know that, you can stick appropriate `define-key' calls into
>> the $lispdir/term/xterm.el file to fix it permanently. (Subtitute
>> the value of $TERM for `xterm'.)
> 
> So ... something like:
> 
> (define-key global-map (read-kbd-macro "M-B M-#") ....)
> 
> I couldn't work out how to actually insert something.

The thing to add it to is `function-key-map', which is a mapping from
keys to keys that Emacs feeds all terminal-entered keybindings
into. (XEmacs is more complex in this area, with a `key-translation-map'
as well, but ismilar points apply.)

So you can just do

(define-key function-key-map (kbd "M-B M-#") "£")

(The syntax of keybindings differs between Emacs and XEmacs, and isn't
what you'd expect in either case; `kbd' accepts ordinary key definitions
as used in documentation and printed by various things and emits the
internal definitions used in keymaps.)

-- 
`On a scale of 1-10, X's "brokenness rating" is 1.1, but that's only
 because bringing Windows into the picture rescaled "brokenness" by
 a factor of 10.' --- Peter da Silva
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list