Wanted - dynamic keybindings for Squeak (was: be a web url -textMorph menus)

Stephane Ducasse ducasse at iam.unibe.ch
Mon Jul 14 16:57:36 UTC 2003


Skipped content of type multipart/appledouble-------------- next part --------------



Daniel, normally it should work with Squeak 2.8 I do not have it here. 
Tell me if it is/ or not.


The idea is that I introduced a ShortCutTable that can be shared or not 
by ParagraphEditor (using a classVar and instance variable
as in the Scanner with TypeTable and typeTable). The idea is that all 
the code is using an instance variable which per default point to a 
classVar. This allows one to (by changing the instance variable value) 
to have a instance based table or to share the table among several 
paragraphEditor.


Here is an example how to set it up.
!ShortcutTables class methodsFor: 'default' stamp: 'SD 10/23/2000 
17:38'!
default
	"self default"
	| shortcutTables |
	shortcutTables := self new.
	self defaultCmdActions: shortcutTables.
	self defaultShiftCmdActions: shortcutTables.
	^ shortcutTables! !


Pay attention I had to fight during three day against this ugly and bad 
paragraphEditor because it was creating
instances like hell every new line of text. (If I remember well).

Stef



On Sunday, July 13, 2003, at 12:34 AM, Daniel Vainsencher wrote:

> Stef, please find the definitive version and post it/pointer to it. And
> if you can try to explain the idea - I hope this will help someone pick
> this project up.
>
> Daniel
>
> Stephane Ducasse <ducasse at iam.unibe.ch> wrote:
>> Hi daniel
>>
>> long time ago I created this kind of functionaluty. I could defined a
>> table of binding per window.
>> I send it several times in the listing in 2.8 and I got fed up to get
>> no reaction so I drop it.
>> Now I can dive in my archives and find it for you, or you can 
>> certainly
>> find it on an archive.
>>
>> Let me know.
>>
>> stef
>>
>> On Wednesday, July 9, 2003, at 06:32 PM, Daniel Vainsencher wrote:
>>
>>> We really should be able to configure specific keybindings for
>>> applications easily, and the user really should be able to customize
>>> them. In short, they should not be hard coded.
>>>
>>> Anybody up to solving this? one thing worth looking at is Roel's
>>> MagicKeys for VW, I don't know how hard it would be to port to 
>>> Squeak,
>>> but it should be a good source for design ideas on some of the 
>>> issues.
>>>
>>> Roel, maybe you can add details?
>>>
>>> Daniel
>>>
>>> Ned Konz <ned at bike-nomad.com> wrote:
>>>> On Wednesday 09 July 2003 05:30 am, Ingo Hohmann wrote:
>>>>> with alt-6 in a textMorph I get a 'be a web url' menu entry. How do
>>>>> I find out which method is invoked on selecting this entry? (when I
>>>>> explore it, I come to
>>>>> target: aMVCMenuMorph selector: #selectMVCItem: arguments: #(16) )
>>>>>
>>>>> I would like to add a 'be a DoIt' item.
>>>>>
>>>>> Where are those menus defined? I'd like to rearrange the mouseclick
>>>>> menu, too.
>>>>
>>>> Easiest way to debug/explore most modal menus is to hit Alt-.
>>>> (interrupt) and examine the call stack, since the modal menus do
>>>> their own polling loop.
>>>>
>>>> So looking up the stack we get to ParagraphEditor>>changeEmphasis:
>>>>
>>>> and just above it you enter the secret land of CmdActions and
>>>> ShiftCmdActions, which is (partly) how ParagraphEditor decides to
>>>> dispatch command keystrokes.
>>>>
>>>> And I believe that I and others in the past have come up with change
>>>> sets to make it easier to customize these menus and keystrokes, but 
>>>> I
>>>> can't remember where I put them (my Squeak directories are
>>>> unimaginably cluttered after 6 years of Squeaking...)
>>>>
>>>> -- 
>>>> Ned Konz
>>>> http://bike-nomad.com
>>>> GPG key ID: BEEA7EFE
>>>
>


More information about the Squeak-dev mailing list