summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Editor.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2009-04-13 18:53:24 +0000
committerMatthias Melcher <fltk@matthiasm.com>2009-04-13 18:53:24 +0000
commit90d4e657672dc2a2827bbbc589e64303368ca8c3 (patch)
treee1c9cc92779e74d8e30c34e58068e736c486f0f9 /src/Fl_Text_Editor.cxx
parent47b348850af4575a41bb15cce2d51ecad9dc5cac (diff)
Added an arrow-key function lookup table for MSWindows vs. OS X to Fl_Text_Editor, waiting for implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6762 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Editor.cxx')
-rw-r--r--src/Fl_Text_Editor.cxx41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx
index 8d50ae933..d70626b75 100644
--- a/src/Fl_Text_Editor.cxx
+++ b/src/Fl_Text_Editor.cxx
@@ -55,6 +55,47 @@ static int utf_len(char c)
return 0;
}
+/* Keyboard Control Matrix
+
+key\modifier plain Ctrl Alt Meta
+ left 1/1 13/9 0/13 0/9
+ right 2/2 14/10 0/14 0/10
+ up 3/19 21/7 0/15 0/17
+ down 4/20 22/8 0/16 0/18
+ home 9/5 17/0 0/0 0/0
+ end 10/6 18/0 0/0 0/0
+ page up 11/7 23/0 0/11 0/0
+ page down 12/8 24/0 0/12 0/0
+ (FLTK action / OS X action)
+ (adding the shift key extends the selection, all other combinations are no-op)
+
+ 0: no-op
+ 1: move cursor to the left, at line beginning wrap to end of prev line, at doc start no-op
+ 2: move cursor to the right, at line end move to beginning of the next line, at doc end no-op
+ 3: move cursor up, at doc top no-op
+ 4: move cursor down, at doc bottom no-op
+ 5: scroll display to top of text (cursor unchanged)
+ 6: scroll display to end of text (cursor unchanged)
+ 7: scroll text down one page (cursor unchanged)
+ 8: scroll text up one page (cursor unchanged)
+ 9: move cursor to beginning of line
+ 10: move cursor to end of line
+ 11: move cursor up one page and scroll down
+ 12: move cursor down one page and scroll up
+ 13: move to the beginning of the word or the previous word
+ 14: move to the end of the word or the next word
+ 15: if start of line: start of prev line, else start of this line
+ 16: if end of line: end of next line, else end of this line
+ 17: move cursor to the beginning of the document
+ 18: move cursor to the end of the document
+ 19: move cursor up, at doc top: home, at doc start: no-op)
+ 20: move cursor down, at doc bot: end, at doc end: no-op)
+ 21: scroll text down one line (cursor unchanged)
+ 22: scroll text up one line (cursor unchanged)
+ 23: move cursor to the beginning of the top of the screen
+ 24: move cursor to the beginning of the bottom of the window
+*/
+
/** The constructor creates a new text editor widget.*/
Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l)
: Fl_Text_Display(X, Y, W, H, l) {