[Pharo-project] Question on 2.0 : shortcuts for menu items
Hi, I'm trying to add a Cmd+r command to format code in Nautilus and I'm unable to find how. Would anybody know ? I tried to modify the menus and the CmdKeyTables in SmalltalkEditor to no effect. Thanks, Thierry -- 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
(aBuilder shortcut: #Foo) category: #NautilusSourceCodeShortcuts default: $r command do: [:target | self formatTextFor: target sourceTextArea ] description: 'Format the text of a text morph'. Defined on class side of the class you want :) Ben On Jul 13, 2012, at 2:30 PM, Goubier Thierry wrote:
Hi,
I'm trying to add a Cmd+r command to format code in Nautilus and I'm unable to find how. Would anybody know ? I tried to modify the menus and the CmdKeyTables in SmalltalkEditor to no effect.
Thanks,
Thierry -- 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 13/07/2012 14:42, Benjamin a écrit :
(aBuilder shortcut: #Foo) category: #NautilusSourceCodeShortcuts default: $r command do: [:target | self formatTextFor: target sourceTextArea ] description: 'Format the text of a text morph'.
Defined on class side of the class you want :)
Found that, yes. Doesn't work... Cmd+r result in a tab (well, if Ctrl+r is really Cmd+r in Linux). Thierry -- 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
command r is already used (to rename stuff) try a key not used like h Ben On Jul 13, 2012, at 3:32 PM, Goubier Thierry wrote:
Le 13/07/2012 14:42, Benjamin a écrit :
(aBuilder shortcut: #Foo) category: #NautilusSourceCodeShortcuts default: $r command do: [:target | self formatTextFor: target sourceTextArea ] description: 'Format the text of a text morph'.
Defined on class side of the class you want :)
Found that, yes.
Doesn't work...
Cmd+r result in a tab (well, if Ctrl+r is really Cmd+r in Linux).
Thierry -- 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 13/07/2012 15:36, Benjamin a écrit :
command r is already used (to rename stuff)
But it triggers on Alt+r, not Ctrl+r. Ctrl+r is caught, but I don't know by what. I'll try to change the key (or the rename key). Trying to follow the KM areas, but lost in a maze of small classes, all identical. How do you guys manage that ? Thierry
try a key not used like h
Ben
On Jul 13, 2012, at 3:32 PM, Goubier Thierry wrote:
Le 13/07/2012 14:42, Benjamin a écrit :
(aBuilder shortcut: #Foo) category: #NautilusSourceCodeShortcuts default: $r command do: [:target | self formatTextFor: target sourceTextArea ] description: 'Format the text of a text morph'.
Defined on class side of the class you want :)
Found that, yes.
Doesn't work...
Cmd+r result in a tab (well, if Ctrl+r is really Cmd+r in Linux).
Thierry -- 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
On 2012-07-13, at 15:43, Goubier Thierry wrote:
Le 13/07/2012 15:36, Benjamin a écrit :
command r is already used (to rename stuff)
But it triggers on Alt+r, not Ctrl+r.
Ctrl+r is caught, but I don't know by what.
Check SmalltalkEditor / TextEditor... They encode some special shortcuts, absolutely wrong, so you cannot redefine them by yourself. At some point we might provide a decent, small TextMorph that allows that..
I'll try to change the key (or the rename key).
Trying to follow the KM areas, but lost in a maze of small classes, all identical. How do you guys manage that ?
in a workspace evaluate KMLog setDebug Open a Transcript, and it will tell what ctrl+r is used for :) Ben On Jul 13, 2012, at 3:44 PM, Goubier Thierry wrote:
Le 13/07/2012 15:36, Benjamin a écrit :
command r is already used (to rename stuff)
But it triggers on Alt+r, not Ctrl+r.
Ctrl+r is caught, but I don't know by what.
I'll try to change the key (or the rename key).
Trying to follow the KM areas, but lost in a maze of small classes, all identical. How do you guys manage that ?
Thierry
try a key not used like h
Ben
On Jul 13, 2012, at 3:32 PM, Goubier Thierry wrote:
Le 13/07/2012 14:42, Benjamin a écrit :
(aBuilder shortcut: #Foo) category: #NautilusSourceCodeShortcuts default: $r command do: [:target | self formatTextFor: target sourceTextArea ] description: 'Format the text of a text morph'.
Defined on class side of the class you want :)
Found that, yes.
Doesn't work...
Cmd+r result in a tab (well, if Ctrl+r is really Cmd+r in Linux).
Thierry -- 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
Le 13/07/2012 15:45, Benjamin a écrit :
in a workspace evaluate KMLog setDebug
Open a Transcript, and it will tell what ctrl+r is used for :)
It only tells you [Ctrl+r] :-( Just noticed that my changes to NautilusUI were not taken in account anyway. Thierry
Ben
On Jul 13, 2012, at 3:44 PM, Goubier Thierry wrote:
Le 13/07/2012 15:36, Benjamin a écrit :
command r is already used (to rename stuff)
But it triggers on Alt+r, not Ctrl+r.
Ctrl+r is caught, but I don't know by what.
I'll try to change the key (or the rename key).
Trying to follow the KM areas, but lost in a maze of small classes, all identical. How do you guys manage that ?
Thierry
try a key not used like h
Ben
On Jul 13, 2012, at 3:32 PM, Goubier Thierry wrote:
Le 13/07/2012 14:42, Benjamin a écrit :
(aBuilder shortcut: #Foo) category: #NautilusSourceCodeShortcuts default: $r command do: [:target | self formatTextFor: target sourceTextArea ] description: 'Format the text of a text morph'.
Defined on class side of the class you want :)
Found that, yes.
Doesn't work...
Cmd+r result in a tab (well, if Ctrl+r is really Cmd+r in Linux).
Thierry -- 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
-- 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 (3)
-
Benjamin -
Camillo Bruni -
Goubier Thierry