I'm trying to change the keyboard binding for "Cmd + up arrow" and
"Cmd + down arrow" - they currently scroll the view up/down if the text is long enough, which I don't use at all. But when I modify ParagraphEditor class>>initializeCmdKeyShortcuts and/or ParagraphEditor>>cursorUp: and cursorDown: (which seem to be assigned by initializeCmdKeyShortcuts), it seems that these methods are called only when the up/down arrows are pressed *without* a command key. Does anyone know where this binding to scroll up/down is set and how I can override it? Apparently ParagraphEditor is the wrong place, or did I miss something? Would any of the packages mentioned in http://wiki.squeak.org/squeak/1844 under "relevant squeak packages" help? Cheers, Amos P.S.: What I'm trying to achieve is to get "Cmd + up/down arrow" to move the lines containing the current selection, or the current line if nothing is selected, up/down by one line. |
On Jan 12, 2008, at 4:09 , Amos wrote: > I'm trying to change the keyboard binding for "Cmd + up arrow" and > "Cmd + down arrow" - they currently scroll the view up/down if the > text is long enough, which I don't use at all. But when I modify > ParagraphEditor class>>initializeCmdKeyShortcuts and/or > ParagraphEditor>>cursorUp: and cursorDown: (which seem to be assigned > by initializeCmdKeyShortcuts), it seems that these methods are called > only when the up/down arrows are pressed *without* a command key. > > Does anyone know where this binding to scroll up/down is set and how I > can override it? Apparently ParagraphEditor is the wrong place, or did > I miss something? Would any of the packages mentioned in > http://wiki.squeak.org/squeak/1844 under "relevant squeak packages" > help? > > Cheers, > > Amos > > P.S.: What I'm trying to achieve is to get "Cmd + up/down arrow" to > move the lines containing the current selection, or the current line > if nothing is selected, up/down by one line. If you have a scrolling wheel mouse, the VM translates scroll events into cmd-up/down keyboard events. These events are used for scrolling the views / morphs, see ScrollController>>scrollByKeyboard ScrollPane>>scrollByKeyboard: - Bert - |
> > I'm trying to change the keyboard binding for "Cmd + up arrow" and
> > "Cmd + down arrow" - they currently scroll the view up/down if the > > text is long enough, which I don't use at all. But when I modify > > ParagraphEditor class>>initializeCmdKeyShortcuts and/or > > ParagraphEditor>>cursorUp: and cursorDown: (which seem to be assigned > > by initializeCmdKeyShortcuts), it seems that these methods are called > > only when the up/down arrows are pressed *without* a command key. > > > > Does anyone know where this binding to scroll up/down is set and how I > > can override it? Apparently ParagraphEditor is the wrong place, or did > > I miss something? Would any of the packages mentioned in > > http://wiki.squeak.org/squeak/1844 under "relevant squeak packages" > > help? > > > > Cheers, > > > > Amos > > > > P.S.: What I'm trying to achieve is to get "Cmd + up/down arrow" to > > move the lines containing the current selection, or the current line > > if nothing is selected, up/down by one line. > > If you have a scrolling wheel mouse, the VM translates scroll events > into cmd-up/down keyboard events. These events are used for scrolling > the views / morphs, see > > ScrollController>>scrollByKeyboard > ScrollPane>>scrollByKeyboard: > > - Bert - Thanks, Bert - I do want to keep that scroll wheel behaviour, and re-routing the scroll events to do what the key combination did and then changing the key combination is a bit too awkward and probably more trouble than it's worth. Guess I'll try to override one of the other key combinations and map it to a mouse gesture shortcut instead. I'm still curious, though, as to why the cursorUp: and cursorDown: methods seem to be assigned to the Cmd shortcuts, yet are only called (judging from when they hit an inserted halt) when the arrows are pressed without Cmd keys... |
Free forum by Nabble | Edit this page |