grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / zune / texteditor / mcc / Keybindings.c
bloba18611a306eb723848a5ac92e1990e812dcd97d8
1 /***************************************************************************
3 TextEditor.mcc - Textediting MUI Custom Class
4 Copyright (C) 1997-2000 Allan Odgaard
5 Copyright (C) 2005-2014 TextEditor.mcc Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc
19 $Id$
21 ***************************************************************************/
23 #include <devices/inputevent.h>
25 #include "private.h"
27 // our default keybindings (every rawkey value with +500 is a vanilla key specification)
28 const struct te_key default_keybindings[] =
30 { RAWKEY_CRSRUP, 0, MUIV_TextEditor_KeyAction_Up },
31 { RAWKEY_CRSRUP, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_PrevLine },
32 { RAWKEY_CRSRUP, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PageUp },
33 { RAWKEY_CRSRUP, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_Top },
34 { RAWKEY_CRSRDOWN, 0, MUIV_TextEditor_KeyAction_Down },
35 { RAWKEY_CRSRDOWN, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_NextLine },
36 { RAWKEY_CRSRDOWN, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PageDown },
37 { RAWKEY_CRSRDOWN, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_Bottom },
38 { RAWKEY_CRSRRIGHT, 0, MUIV_TextEditor_KeyAction_Right },
39 { RAWKEY_CRSRRIGHT, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_NextWord },
40 { RAWKEY_CRSRRIGHT, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_EndOfLine },
41 { RAWKEY_CRSRRIGHT, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_NextSentence },
42 { RAWKEY_CRSRLEFT, 0, MUIV_TextEditor_KeyAction_Left },
43 { RAWKEY_CRSRLEFT, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PrevWord },
44 { RAWKEY_CRSRLEFT, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_StartOfLine },
45 { RAWKEY_CRSRLEFT, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_PrevSentence },
47 { 8+500, 0, MUIV_TextEditor_KeyAction_Backspace },
48 { 0x7f+500, 0, MUIV_TextEditor_KeyAction_Delete },
49 { 13+500, 0, MUIV_TextEditor_KeyAction_Return },
50 { 13+500, IEQUALIFIER_NUMERICPAD, MUIV_TextEditor_KeyAction_Return },
51 { 9+500, 0, MUIV_TextEditor_KeyAction_Tab },
52 { 'x'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Cut },
53 { 'c'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Copy },
54 { 'v'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Paste },
55 { 'z'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Undo },
56 { 'z'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_Redo },
57 { RAWKEY_HELP, IEQUALIFIER_COMMAND, MUIV_TextEditor_KeyAction_SuggestWord },
59 { 8+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelBOL },
60 { 8+500, IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_DelBOL },
61 { 0x7f+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelEOL },
62 { 0x7f+500, IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_DelEOL },
63 { 8+500, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_DelBOW },
64 { 0x7f+500, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_DelEOW },
65 { 'x'+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelLine },
66 { 0x9+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_NextGadget },
68 { '1'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark1 },
69 { '2'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark2 },
70 { '3'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark3 },
72 { '1'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark1 },
73 { '2'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark2 },
74 { '3'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark3 },
76 { RAWKEY_PAGEUP, 0, MUIV_TextEditor_KeyAction_PageUp },
77 { RAWKEY_PAGEDOWN, 0, MUIV_TextEditor_KeyAction_PageDown },
78 { RAWKEY_HOME, 0, MUIV_TextEditor_KeyAction_Top },
79 { RAWKEY_END, 0, MUIV_TextEditor_KeyAction_Bottom },
81 { 'a'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_SelectAll },
82 { 'a'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SelectNone },
83 { -1, 0, 0 }