1 /* AbiWord
2 * Copyright (C) 1998 AbiSource, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20
21 // ********************************************************************************
22 // ********************************************************************************
23 // *** THIS FILE DEFINES THE BINDINGS TO HANG OFF THE DeadAbovedot PREFIX KEY IN ***
24 // *** THE DEFAULT BINDINGS TABLE. ***
25 // ********************************************************************************
26 // ********************************************************************************
27
28 #include "ut_assert.h"
29 #include "ut_types.h"
30 #include "ev_EditBits.h"
31 #include "ev_EditBinding.h"
32 #include "ev_EditMethod.h"
33 #include "ev_NamedVirtualKey.h"
34 #include "ap_LoadBindings.h"
35 #include "ap_LB_DeadAbovedot.h"
36
37 #define _S | EV_EMS_SHIFT
38 #define _C | EV_EMS_CONTROL
39 #define _A | EV_EMS_ALT
40
41 /*****************************************************************
42 ******************************************************************
43 ** load bindings for the non-nvk
44 ** (character keys). note that SHIFT-state is implicit in the
45 ** character value and is not included in the table. note that
46 ** we do not include the ASCII control characters (\x00 -- \x1f
47 ** and others) since we don't map keystrokes into them.
48 ******************************************************************
49 *****************************************************************/
50
51 static struct ap_bs_Char s_CharTable[] =
52 {
53 // {char, /* desc */ { none, _C, _A, _A_C }},
54
55 // Latin-[234] characters
56 {0x45, /* E */ { "insertAbovedotData", "", "", "" }},
57 {0x49, /* I */ { "insertAbovedotData", "", "", "" }},
58 {0x5a, /* Z */ { "insertAbovedotData", "", "", "" }},
59 {0x43, /* C */ { "insertAbovedotData", "", "", "" }},
60 {0x47, /* G */ { "insertAbovedotData", "", "", "" }},
61
62 {0x65, /* e */ { "insertAbovedotData", "", "", "" }},
63 // {0x69, /* i */ { "insertAbovedotData", "", "", "" }},
64 {0x7a, /* z */ { "insertAbovedotData", "", "", "" }},
65 {0x63, /* c */ { "insertAbovedotData", "", "", "" }},
66 {0x67, /* g */ { "insertAbovedotData", "", "", "" }},
67 };
68
69 /*****************************************************************
70 ******************************************************************
71 ** put it all together and load the default bindings.
72 ******************************************************************
73 *****************************************************************/
74
ap_LoadBindings_DeadAbovedot(AP_BindingSet * pThis,EV_EditBindingMap * pebm)75 bool ap_LoadBindings_DeadAbovedot(AP_BindingSet * pThis, EV_EditBindingMap * pebm)
76 {
77 pThis->_loadChar(pebm,s_CharTable,G_N_ELEMENTS(s_CharTable),NULL,0);
78
79 return true;
80 }
81