diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index e9b4b5b8f..4df7cb003 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -1136,6 +1136,30 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) if (EditBoxInGlobalFocus()) HandleKeypress(WKC_RIGHT | WKC_CTRL, 0); } +/** Move cursor one line up. */ +- (void)moveUp:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_UP, 0); +} + +/** Move cursor one line down. */ +- (void)moveDown:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_DOWN, 0); +} + +/** MScroll one line up. */ +- (void)moveUpAndModifySelection:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_UP | WKC_SHIFT, 0); +} + +/** Scroll one line down. */ +- (void)moveDownAndModifySelection:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_DOWN | WKC_SHIFT, 0); +} + /** Move cursor to the start of the line. */ - (void)moveToBeginningOfLine:(id)sender { @@ -1148,6 +1172,30 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) if (EditBoxInGlobalFocus()) HandleKeypress(WKC_END, 0); } +/** Scroll one page up. */ +- (void)scrollPageUp:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_PAGEUP, 0); +} + +/** Scroll one page down. */ +- (void)scrollPageDown:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_PAGEDOWN, 0); +} + +/** Move cursor (and selection) one page up. */ +- (void)pageUpAndModifySelection:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_PAGEUP | WKC_SHIFT, 0); +} + +/** Move cursor (and selection) one page down. */ +- (void)pageDownAndModifySelection:(id)sender +{ + if (EditBoxInGlobalFocus()) HandleKeypress(WKC_PAGEDOWN | WKC_SHIFT, 0); +} + /** Scroll to the beginning of the document. */ - (void)scrollToBeginningOfDocument:(id)sender { |