[racket-dev] while resizing drawing into a canvas is off

From: Marijn (hkBst at gentoo.org)
Date: Thu Oct 20 12:26:01 EDT 2011

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/20/11 18:12, Matthew Flatt wrote:
> At Thu, 20 Oct 2011 17:58:08 +0200, Marijn wrote:
>>>> Another thing. How do you enable simple
>>>> select/copy/cut/paste behavior with standard key-bindings in
>>>> an editor?
>>> 
>>> Apply `(current-text-keymap-initializer)' to the editor.
>> 
>> I'm kinda struggling with this one. What I came up with is:
>> 
>> (define default-keymap (new keymap%)) 
>> ((current-text-keymap-initializer) default-keymap) 
>> (add-text-keymap-functions default-keymap)

The last line here is actually not needed and doesn't seem to do anything.

>> and then I do (send editor set-keymap default-keymap) for each
>> editor. Is that what you meant?
> 
> Yes, though I forgot exactly how the parameter value works.
> 
>> This makes some emacs-like bindings work (C-a and C-e go to
>> beginning and end of line, C-y -> yank). Is there a way to get
>> the more familiar {C-a -> select-all, C-v -> copy-selection,
>> etc.} bindings?
> 
> Use `add-editor-keymap-functions' in addition to 
> `add-text-keymap-functions'.

Actually I was already trying these, but AFAICT they don't do anything.

Marijn

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6gS5kACgkQp/VmCx0OL2zM0QCeKhFeH89ymFTA+FzXoz0taFav
fXkAnjGjYenPu9gXbn+vIFFDdfGb3hdd
=sTyd
-----END PGP SIGNATURE-----


Posted on the dev mailing list.