Re: Home and end keys and NSTableView, not handled automatically?
Re: Home and end keys and NSTableView, not handled automatically?
- Subject: Re: Home and end keys and NSTableView, not handled automatically?
- From: Allan Odgaard <email@hidden>
- Date: Tue, 14 Sep 2004 19:53:31 +0200
On 14. Sep 2004, at 19:39, Sean McBride wrote:
Thanks for this link! I was surprised to see that NSResponder has so
many methods for so many things: moveWordForward:, deleteToEndOfLine:,
scrollPageDown:, etc. I guess this is smart, as the link above
explains,
it means we don't have to deal with physical keys, and different keys
can
be mapped to different higher level functions.
Yes, it's kind of cool, especially since the system looks in a plist
file the user can change to map keys to action methods. I just wish
there was application level support for this stuff (introducing "local"
key binding files, as done by e.g. Xcode).
But, NSResponder seems to also lack any kind of scrollToTopOfPage:
(equivalent to home key). This seems to be another omission/bug,
wouldn't you say?
Yes, you mean there is moveToBeginningOfDocument: and no
scrollToBeginningOfDocument:?
Actually though, it seems mainly to be missing from the documentation:
% pl <
/System/Library/Frameworks/AppKit.framework/Resources/
StandardKeyBinding.dict|grep scrollTo
"\U00d4\U00fa\U00a9" = "scrollToBeginningOfDocument:";
"\U00d4\U00fa\U00b4" = "scrollToEndOfDocument:";
So the default key bindings plist does bind a key to these (missing)
actions.
I *think* the reason why the NSScrollView only handles page up/down
is,
that by default these keys only scroll the custom view, they do *not*
move the cursor
Home and end also should not move the cursor:
Ah, was not aware of that -- hmm... did I change that binding also
myself, or is NSTextView then not following AHIG!?! (note to self:
check that later)
I guess then, that the NSScrollView really ought to also catch the
scroll to begin/end of document.
[...] One thing I hate about Windows is how
page up/down move the cursor. I am used to them being shortcuts for
the
scrollbar.
hehe... and everybody new on the Mac hates 1) that page up/down doesn't
move the cursor and 2) home/end doesn't move to begin/end of line
(instead of document).
--
http://macromates.com/ ::: TextMate, OS X text editor
http://macromates.com/sigpipe/ ::: Personal weblog about
programming
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden