[plt-scheme] Meta Key in Windows XP

From: Robby Findler (robby at cs.uchicago.edu)
Date: Fri Oct 20 10:13:41 EDT 2006

At Fri, 20 Oct 2006 15:06:07 +0100, "Paulo J. Matos" wrote:
> On 10/6/06, pedro pinto <pedro.e.pinto at gmail.com> wrote:
> > Hi there,
> >
> > Is there any way in DrScheme to properly assign the meta key to alt on
> > windows? It seems like alt=meta for some values of meta, namely M-f, M-v,
> > but not others like M-C-p, M-space and so on. The docs state:
> >
> > " Under Windows and Mac OS X, Meta is only available through the Escape
> > key."
> >
> > I find pressing and releasing Esc to simulate meta very awkward.
> >
> >
> 
> Without looking at the docs and by reading this question by Pedro, I'd
> like to add an item to this question on keybindings:
>   - Is there a way to assign a key to the insertion of a word in the
> current position of the buffer. For example, I press the WinKey and
> get a lambda or something.

I don't know the answer to Pedro's original post, but that particular
keybinding is already available, <menu-key>-\. 

If you wanted to map a different key to something, you could run this
code to find out what the key looks like and then use that in your
keymap:

(define kcanvas%
  (class canvas%
    (define/override (on-char e)
      (unless (eq? 'release (send e get-key-code))
        (printf "~s\n" (send e get-key-code))))
    (super-new)))

(define f (new frame% [label ""] [width 200] [height 200]))
(define c (new kcanvas% [parent f]))
(send c focus)
(send f show #t)

hth,
Robby



Posted on the users mailing list.