Status: New
Owner: ---- Labels: Type-Feature Milestone-2.0 New issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Morphic contains it's own keystroke stuff for shortcuts, in addition to the Keymapping one. I would like to see all shortcuts managed by Keymapping; it would simplify the key handling code a lot. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #1 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 This slice allows for per instance shortcuts and disconnect most legacy hardcoded shortcuts in Morphs (all ctrl and cmd shortcuts). Work in progress. Name: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.1 Author: ThierryGoubier Time: 12 September 2012, 10:22:34.004 am UUID: e6848ad8-f65d-4f2b-9567-7c77070de373 Ancestors: Dependencies: Keymapping-Core-ThierryGoubier.134 KMDispatcher: - Add a perInstanceOnly flag. - Change keymapObservers to enforce an ordering on keymaps searches and take in account the perInstanceOnly flag. - Change dispatchKeystroke: to mark as handled all ctrl and cmd events (and, as a consequence, remove them from Morphic event processing). Beware : has impact on all Morphs ! Do not integrate yet ! Please test ! _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #2 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Name: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.2 Author: ThierryGoubier Time: 12 September 2012, 4:58:19.822 pm UUID: bdcdf0c4-19ce-4876-ae77-c7bda1e410fb Ancestors: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.1 Dependencies: Keymapping-Core-ThierryGoubier.134, Spec-Core-ThierryGoubier.56, Spec-Examples-ThierryGoubier.11, Spec-Widgets-ThierryGoubier.64 Spec integrating the change. Spec doing focus change by default. - Test example : TextShortcutExample. Left to do: Spec cleanup (key handling, focusBlock) Next: morphic cleanup. Do not integrate unless you want to test. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Updates:
Status: FixReviewNeeded Cc: [hidden email] Comment #3 on issue 6656 by marianopeck: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 (No comment was entered for this change.) _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #4 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Two levels of focus switching among morphs to clean : - The Spec one - The Morphic one To replace by a single, Keymapping focus switching with two levels : the Morphic level and the Spec level ? Hey Spec, why reinventing the Morphic navigateFocusForward ? _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Updates:
Status: MonkeyIsChecking Comment #5 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656#c5 The Monkey is currently checking this issue. Please don't change it! _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Updates:
Status: WorkNeeded Comment #6 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656#c6 Monkey went bananas: -------------------- Error while loading SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.3 from http://ss3.gemstone.com/ss/PharoInbox: MessageNotUnderstood: RPackageSet>>extensionCategoriesForClass: 1: RPackageSet(Object)>>doesNotUnderstand: #extensionCategoriesForClass: 2: [:class | (aWorkingCopy packageSet extensionCategoriesForClass: class) do: [:category | (class organization listAtCategoryNamed: category) isEmpty ifTrue: [class organization removeCategory: category]]] in GoferCleanup>>cleanupProtocols: 3: Array(SequenceableCollection)>>do: 4: GoferCleanup>>cleanupProtocols: 5: GoferCleanup>>cleanup: 6: [:each | self cleanup: each] in GoferCleanup>>execute 7: OrderedCollection>>do: 8: GoferCleanup>>execute 9: Gofer>>execute:do: 10: Gofer>>execute: ... ---------------------------------------------------------- Loaded Source: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.3 from http://ss3.gemstone.com/ss/PharoInbox Tested using Pharo-2.0-20281-a on CoInterpreter VMMaker-oscog-IgorStasenko.162 uuid: e4554f9a-cc90-4826-a807-ac282b782fe4 Sep 7 2012 StackToRegisterMappingCogit VMMaker-oscog-IgorStasenko.162 uuid: e4554f9a-cc90-4826-a807-ac282b782fe4 Sep 7 2012 https://git.gitorious.org/cogvm/blessed.git Commit: aeb0705cde4b8fc57cb262dc051c5ee6dfa72a14 Date: 2012-07-26 16:38:48 +0200 By: Igor Stasenko <[hidden email]> _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #7 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 I probably have a problem with MC. Couldn't see some Morphic changes, and they are probably not in the SLICE. Thierry Name: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.4 Author: ThierryGoubier Time: 13 September 2012, 1:33:10.736 pm UUID: 06f6659e-1e2a-4fa2-9223-6d3b53bdc835 Ancestors: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.3 Dependencies: Keymapping-Core-ThierryGoubier.136, Spec-Core-ThierryGoubier.58, Spec-Examples-ThierryGoubier.11, Spec-Widgets-ThierryGoubier.65, CI-Core-ThierryGoubier.40 Finished removing all keyhandling code from Spec apart from Keymapping. Moved ButtonModel and ListComposableModel shortcuts to Keymapping. Moved Morphic navigation to Keymapping : Keymapping OK, Morphic navigation is not (Morphic bug). RPackage / MC is bugging and may be loosing some of my changes. MC changes gives me incorrect results. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #8 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 MNU in RPackageSet... RPackageSet>>changeRecordForOverriddenMethod: _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #9 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Unable to save Morphic changes for the time being. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #10 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 There was already the ability to add keymapping categories to morph instances. What does this fix change exactly? _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #11 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Starting point: - The possibility to remove static targets (i.e. remove system wide shortcuts for a given instance). - The possibility to have search among targets in a non-random order. - Simpler code when dealing with some patterns (i.e. FinderNode : shortcuts depends on the type of item selected) - Avoiding creating subclasses of KMDispatcher. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #12 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 cool to see progress! could you save again? Esteban fixed the MNU RPacageSet in the last release? If not I'll reopen issue #6666 _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #13 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Thanks Camillo. I have a problem doing the update, will load RPackage by hand. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #14 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Ok. As I said to Sean, I need your suggestions and wisdom for some changes to Keymapping. I'll set some vocabulary first, and you will be able to check if I have understood Keymapping in the first place: Shortcuts in Keymapping are grouped in keymaps. Keymaps may have sub categories, to cope with platform differences : #Unix, #Windows, #MacOS, #all (it looks nice and forward thinking!). KMDispatcher is in charge of trying to match a key event (received by the Morph which has the focus(remember that, it has consequences)) to a shortcut. It cycles through targets to do so, each target having one or more keymap associated. KMDispatcher is one of the first matcher seen by a Morph (which is very good, thanks for the guy who did that!). If a shortcut is not matched by KMDispatcher, it falls through in Morphic other key handling code (Important point). Morphic may move key events between morphs, giving a chance (chance ? more like bad luck when that happens) for another morph and KMDispatcher to match the event. KMDispatcher targets belong to three categories : - static targets : global keymaps linked to the morph class. The use of static targets is #deprecated in the KMDispatcher code. - targets : named keymaps (from the global KMRepository) that are associated with a KMDispatcher instance with a call to attachCategory: - per instance target : keymaps setup by calling on:do: on the KMDispatcher instance Initially, KMDispatcher would randomly iterate over all those targets to match a shortcut. I changed that to force the following order: per instance target, targets, static targets (but since targets is a set, if you load multiple targets in a KMDispatcher with overlapping shortcuts, it's random order again). Now, there is a need for some applications to have fine control over which shortcuts are active, and static targets gets in the way of that, since they are allways checked. On the contrary, targets and per instance target may be resetted by doing KMDispatcher reset. So my choice is : 1) Add a flag to KMDispatcher to disallow, if true, static targets 2) Remove the static targets and make reset erase both targets and per instance targets. 1) works, but is a bit of a kludge (and is visible to applications since they have to learn to use it). Compatibility with code that rely on static targets is perfect. This is the one I implemented for now in the slices. Total control by an application is: aKMDispatcher perInstanceOnly: true. "Switching to vim mode" aKMDispatcher reset. "Yep, but targets are not resetted." aKMDispatcher on: $d, $d do: [self eraseLine]. 2) Break compatibility with code relying on static targets : is there any such code ? Nautilus doesn't I believe, TextEditor and SmalltalkEditor (the two non-Nautilus global keymaps) are targets (non-static) for PluggableTextMorph. Once done, total control by an application is simply : aKMDispatcher reset. aKMDispatcher on: $d , $d do: [self eraseLine] So which one would you prefer ? _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #15 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Another question now. Would you like an API #on:do: (on: aShortcut do: aBlock) at the ComposableModel level in Spec ? I also solved a Morphic bug related to focus navigation, so I could deprecate and remove focusOrder in Spec (it's duplicating what should be working in Morphic now). _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #16 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Yep! Loading the new version of RPackage-Core by hand worked. Name: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.6 Author: ThierryGoubier Time: 14 September 2012, 11:42:45.596 am UUID: d42d62de-3860-47b6-858e-a98623eadfce Ancestors: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.5 Dependencies: Keymapping-Core-ThierryGoubier.137, Spec-Core-ThierryGoubier.59, Spec-Examples-ThierryGoubier.11, Spec-Widgets-ThierryGoubier.65, CI-Core-ThierryGoubier.40, Morphic-ThierryGoubier.1238 Found and corrected bug in Morphic navigateFocusForward/Backward. Reverted to on:do: for shortcuts for the time being. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #17 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 Ok, for fun to you guys ! TextEditor and SmalltalkEditor global keymaps are broken... Try ctrl+end in any editor and you will see. There is a trap for the unwary in the global keymap system : the target may not be what you expect when you write the keymap. Luckily, the passthrough code let TextEditor and SmalltalkEditor do their work the old way. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #18 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 I have a difficult question. Is this true ? In a PluggableTextMorph, the KMDispatcher instance is shared with the TextMorphForEditView that it contains ? Morphs tree: PluggableTextMorph -> TransformMorph -> TextMorphForEditView Both morphs share the same KMDispatcher whose morph is PluggableTextMorph. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #19 on issue 6656 by [hidden email]: Move all shortcuts handling to Keymapping http://code.google.com/p/pharo/issues/detail?id=6656 A new slice for review, with solution 2 of http://code.google.com/p/pharo/issues/detail?id=6656#c14. It works and has sample code for doing some of the hard stuff. There is quite some changes to Keymapping with the removal of staticTargets. If you think it's the right path, moving everything to Keymapping should only be a matter of adding the right shortcuts. Please look at Morph>>kmDispatcher if you have a better idea for setting this up (default and per-Morph shortcuts). Name: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.7 Author: ThierryGoubier Time: 14 September 2012, 5:00:14.212 pm UUID: e8f846d9-9b88-4bbc-967b-286e21cb5a5a Ancestors: SLICE-Issue-6656-Move-all-shortcuts-handling-to-Keymapping-ThierryGoubier.6 Dependencies: Keymapping-Core-ThierryGoubier.138, Spec-Core-ThierryGoubier.60, Spec-Examples-ThierryGoubier.11, Spec-Widgets-ThierryGoubier.66, CI-Core-ThierryGoubier.40, Morphic-ThierryGoubier.1238, Spec-Tools-ThierryGoubier.55, Text-ThierryGoubier.24 - Changed KMDispatcher to not use static targets (per class keymap) -- Added TextMorph keymap to TextEditor users with the right target. -- Removed perInstanceKeymapOnly everywhere (Spec and KMDispatcher) -- Added two low-level shortcuts to SmalltalkEditor to replace Morphic shortcuts : ctrl+t and ctrl+shift+f (ifTrue: and ifFalse:) to experiment two ways of accessing low level functions of TextEditor and SmalltalkEditor. - Left to do: scan all Morphic code to replace keystroke processing by shortcuts, look at cursor keys and friends. Can be done step by step from now on. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Free forum by Nabble | Edit this page |