How to bind keyboard shortcuts to messages ?
I was wondering what the relevant classes are for binding shortcuts to messages. I wanted to create my own shortcuts for controlling the Help tool of pharo and possibly of other functionality as well to bring pharo closer to emacs. I want to liberate pharo from the use of mouse completely similarly to how emacs works. How I can do this ? Is there any documentation about this ? -- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Something like this? http://playingwithobjects.wordpress.com/2013/03/19/keymappings-101-for-pharo... :) On Tue, Sep 10, 2013 at 7:41 PM, kilon <thekilon@yahoo.co.uk> wrote:
I was wondering what the relevant classes are for binding shortcuts to messages. I wanted to create my own shortcuts for controlling the Help tool of pharo and possibly of other functionality as well to bring pharo closer to emacs. I want to liberate pharo from the use of mouse completely similarly to how emacs works.
How I can do this ?
Is there any documentation about this ?
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Wow you are awesome, thank you , thank you and thank you. Exactly what I wanted and looks very easy to do. Wonderful. Guillermo Polito wrote
Something like this?
http://playingwithobjects.wordpress.com/2013/03/19/keymappings-101-for-pharo...
:)
On Tue, Sep 10, 2013 at 7:41 PM, kilon <
thekilon@.co
> wrote:
I was wondering what the relevant classes are for binding shortcuts to messages. I wanted to create my own shortcuts for controlling the Help tool of pharo and possibly of other functionality as well to bring pharo closer to emacs. I want to liberate pharo from the use of mouse completely similarly to how emacs works.
How I can do this ?
Is there any documentation about this ?
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
there is a online chapter at: https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/ On Sep 10, 2013, at 7:41 PM, kilon <thekilon@yahoo.co.uk> wrote:
I was wondering what the relevant classes are for binding shortcuts to messages. I wanted to create my own shortcuts for controlling the Help tool of pharo and possibly of other functionality as well to bring pharo closer to emacs. I want to liberate pharo from the use of mouse completely similarly to how emacs works.
How I can do this ?
Is there any documentation about this ?
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Thank you Stephane -- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Stephane please note that your documentation does not work for my pharo 3.0 for example according to Guillermo blog post binding closing the window of workspace to shift+cmd+a morph on: $a shift command do: [ morph delete ]. works like a charm. But your doc in the link you gave me says morph bindKeyCombination: $a shift command toAction: [ morph delete ]. which does not work. Maybe I am using an older Pharo 3.0 ? -- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
yes you are right, but in fact Stef documentation is ok... just "ahead of his time": we still didn't have the time to integrate the change who will change #on:do:, but it will come... :) Esteban On Sep 10, 2013, at 11:02 PM, kilon <thekilon@yahoo.co.uk> wrote:
Stephane please note that your documentation does not work for my pharo 3.0 for example according to Guillermo blog post binding closing the window of workspace to shift+cmd+a
morph on: $a shift command do: [ morph delete ].
works like a charm. But your doc in the link you gave me says
morph bindKeyCombination: $a shift command toAction: [ morph delete ].
which does not work. Maybe I am using an older Pharo 3.0 ?
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable. -- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Hehey! I just downloaded latest 3.0 and #bindKeyCombination: toAction: is there (you made me doubt if I did it or not! :P) But yes, the api for 20 is on:do: and it changed for 30 to clarify. On Wed, Sep 11, 2013 at 9:32 AM, kilon <thekilon@yahoo.co.uk> wrote:
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Le 11/09/2013 09:49, Guillermo Polito a écrit :
Hehey! I just downloaded latest 3.0 and #bindKeyCombination: toAction: is there (you made me doubt if I did it or not! :P)
But yes, the api for 20 is on:do: and it changed for 30 to clarify.
Me, I'm getting a bit confused in 30 about that:). It seems it has changed three times in 3.0. I've seen so far being discussed: onKey:do: onShortcut:do: onKeyCombination:do: and now: bindKeyCombination:toAction: Has on:do: been removed or deprecated in 3.0? Thierry
On Wed, Sep 11, 2013 at 9:32 AM, kilon <thekilon@yahoo.co.uk <mailto:thekilon@yahoo.co.uk>> wrote:
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
On Wed, Sep 11, 2013 at 10:03 AM, Goubier Thierry <thierry.goubier@cea.fr>wrote:
Le 11/09/2013 09:49, Guillermo Polito a écrit :
Hehey! I just downloaded latest 3.0 and #bindKeyCombination: toAction:
is there (you made me doubt if I did it or not! :P)
But yes, the api for 20 is on:do: and it changed for 30 to clarify.
Me, I'm getting a bit confused in 30 about that:). It seems it has changed three times in 3.0. I've seen so far being discussed:
onKey:do: onShortcut:do: onKeyCombination:do:
and now:
bindKeyCombination:toAction:
Yes, we revisited the decision a couple of times :). Sorry if that made trouble...
Has on:do: been removed or deprecated in 3.0?
Not yet. As you can see if you browse latest version, you have on: aShortcut do: anAction ^ self bindKeyCombination: aShortcut toAction: anAction That should be actually deprecated (to avoid people using it and confuse it with exception handling), yes...
Thierry
On Wed, Sep 11, 2013 at 9:32 AM, kilon <thekilon@yahoo.co.uk <mailto:thekilon@yahoo.co.uk>> wrote:
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable.
-- View this message in context: http://forum.world.st/How-to-**bind-keyboard-shortcuts-to-** messages-tp4707525p4707605.**html<http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4...> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Le 11/09/2013 12:51, Guillermo Polito a écrit :
On Wed, Sep 11, 2013 at 10:03 AM, Goubier Thierry <thierry.goubier@cea.fr <mailto:thierry.goubier@cea.fr>> wrote:
Le 11/09/2013 09:49, Guillermo Polito a écrit :
Hehey! I just downloaded latest 3.0 and #bindKeyCombination: toAction: is there (you made me doubt if I did it or not! :P)
But yes, the api for 20 is on:do: and it changed for 30 to clarify.
Me, I'm getting a bit confused in 30 about that:). It seems it has changed three times in 3.0. I've seen so far being discussed:
onKey:do: onShortcut:do: onKeyCombination:do:
and now:
bindKeyCombination:toAction:
Yes, we revisited the decision a couple of times :). Sorry if that made trouble...
The last one has the merit of being perfectly clear :)
Has on:do: been removed or deprecated in 3.0?
Not yet. As you can see if you browse latest version, you have
on: aShortcut do: anAction ^ self bindKeyCombination: aShortcut toAction: anAction
That should be actually deprecated (to avoid people using it and confuse it with exception handling), yes...
And to force all users of it to switch to the new version when porting to 3.0 as well. If it looks as reasonably final, I'll add an issue to bring the new selector to 2.0. Thanks :) Thierry
Thierry
On Wed, Sep 11, 2013 at 9:32 AM, kilon <thekilon@yahoo.co.uk <mailto:thekilon@yahoo.co.uk> <mailto:thekilon@yahoo.co.uk <mailto:thekilon@yahoo.co.uk>>> wrote:
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable.
-- View this message in context: http://forum.world.st/How-to-__bind-keyboard-shortcuts-to-__messages-tp47075... <http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4...> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
yes you are correct of course, it has changed, I download latest image and now it works. Apparently Pharo moves too fast forward for me :D Will need to make more regular download of images. Actually now that I think of it I need to ask another question of the list about staying up to date, I think it deserves its own thread. Guillermo Polito wrote
Hehey! I just downloaded latest 3.0 and #bindKeyCombination: toAction: is there (you made me doubt if I did it or not! :P)
But yes, the api for 20 is on:do: and it changed for 30 to clarify.
On Wed, Sep 11, 2013 at 9:32 AM, kilon <
thekilon@.co
> wrote:
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Le 11/09/2013 10:05, kilon a écrit :
yes you are correct of course, it has changed, I download latest image and now it works. Apparently Pharo moves too fast forward for me :D Will need to make more regular download of images. Actually now that I think of it I need to ask another question of the list about staying up to date, I think it deserves its own thread.
Can start here :) What I do is have makefiles which delete my local image and build a new one by: downloading from get.pharo.org and loading slices and default packages I need. Rebuilding a new image from scratch takes between 1 and 5 minutes (with a huge boost courtesy of Esteban's RPackageSet caching). Thierry
Guillermo Polito wrote
Hehey! I just downloaded latest 3.0 and #bindKeyCombination: toAction: is there (you made me doubt if I did it or not! :P)
But yes, the api for 20 is on:do: and it changed for 30 to clarify.
On Wed, Sep 11, 2013 at 9:32 AM, kilon <
thekilon@.co
> wrote:
Ah ok, no problemo I am in no hurry, and I agree its a very important change as it makes things a lot more readable.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- View this message in context: http://forum.world.st/How-to-bind-keyboard-shortcuts-to-messages-tp4707525p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
participants (5)
-
Esteban Lorenzano -
Goubier Thierry -
Guillermo Polito -
kilon -
Stéphane Ducasse