[plt-scheme] Swedish keyboard bug in DrScheme
It works with the Canadian multilingual standard keyboard.
Thank you
André Mayers, Ph.D., M. Ps.
professeur agrégé
Département d'informatique
Université de Sherbrooke
Sherbrooke (Québec) Canada J1K 2R1
tél: +1 819-821-8000 poste 62041
fax: +1 819-821-8200
andre.mayers at usherbrooke.ca
http://www.dmi.usherb.ca/~amayers
Andre
-----Message d'origine-----
De : plt-scheme-bounces at list.cs.brown.edu [mailto:plt-scheme-bounces at list.cs.brown.edu] De la part de Robby Findler
Envoyé : June-13-08 1:21 PM
À : Pekka Karjalainen
Cc : PLT-Scheme
Objet : Re: [plt-scheme] Swedish keyboard bug in DrScheme
Thanks for figuring this out! I don't have a sweedish keyboard to test this on, so I wonder if one of you can help me by applying the patch below (just a simple change to two lines), exiting drscheme, running "setup-plt" from a shell/command window and then seeing if DrScheme behaves properly after that?
The file in question in plt/collects/framework/private/keymap.ss. Just in case you're not familiar with the notation below, the lines with the "-" in front go away and should be replaced by the ones with the "+" in front (but don't include the "+" itself). The lines without "+"
or "-" are just there for context so you can be sure you're in the right spot in the file.
===================================================================
--- keymap.ss (revision 10227)
+++ keymap.ss (working copy)
@@ -1079,8 +1079,8 @@
(setup-mappings greek-letters #f)
(setup-mappings Greek-letters #t))
- (map "c:\\" "TeX compress")
- (map "m:\\" "TeX compress")
+ (map "~m:c:\\" "TeX compress")
+ (map "~c:m:\\" "TeX compress")
(map-meta "c:down" "down-into-embedded-editor")
(map "a:c:down" "down-into-embedded-editor")
Thanks,
Robby
On Fri, Jun 13, 2008 at 11:33 AM, Pekka Karjalainen <p3k at iki.fi> wrote:
> On 6/13/08, Niklas Larsson <nifty at live.se> wrote:
>>
>> In DrScheme 4.0 for Windows it is impossible to type a backslash
>> character on a swedish keyboard. We use the AltGr-+ combination to
>> get '\' on swedish keyboards, it does nothing in DrScheme, all other
>> AltGr combinations seem to work fine (braces, @, $, €...). This
>> problem didn't exist in v371. A really weird bug.
>
> DrScheme has a default keybinding where Meta-\ means "TeX compress".
> This changes the names of greek letters written in TeX style to the
> corresponding symbols. E.g. \beta turns into the actual character for
> lowercase beta. I think this only works when the caret is placed right
> after such a string.
>
> You can change the keybinding with the help of this piece of code.
> It's based on a message I found in the mailing list archives, as
> referenced. Save this as a file mykeys.ss somewhere convenient.
>
> ;; following the msg
> http://www.cs.brown.edu/pipermail/plt-scheme/2006-March/012391.html
> (module mykeys (lib "keybinding-lang.ss" "framework") (define
> (make-handler s)
> (lambda (editor event)
> (send editor insert (make-object string-snip% s))))
>
> (keybinding "M:\\" (make-handler "\\")))
>
> Then go to Edit -> Keybindings -> Add User-defined Keybindings and
> choose the file you just saved. This should make the key combination
> do what you expect. You can remove this file from use later; an option
> to do this appears in the menu.
>
> If the preferred form for the above in DrScheme 4.0 is something else,
> I'd be happy to know about it. All I really know is that it works for
> me, and I'll eventually get around to learning more about snips and
> events...
>
> Pekka Karjalainen, with pretty much the same kind of keyboard
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>