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 DeadDoubleacute 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_DeadDoubleacute.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-2 characters
56 {0x4f, /* O */ { "insertDoubleacuteData", "", "", "" }},
57 {0x55, /* U */ { "insertDoubleacuteData", "", "", "" }},
58
59 {0x6f, /* o */ { "insertDoubleacuteData", "", "", "" }},
60 {0x75, /* u */ { "insertDoubleacuteData", "", "", "" }},
61 };
62
63
64 /*****************************************************************
65 ******************************************************************
66 ** put it all together and load the default bindings.
67 ******************************************************************
68 *****************************************************************/
69
ap_LoadBindings_DeadDoubleacute(AP_BindingSet * pThis,EV_EditBindingMap * pebm)70 bool ap_LoadBindings_DeadDoubleacute(AP_BindingSet * pThis,
71 EV_EditBindingMap * pebm)
72 {
73 pThis->_loadChar(pebm,s_CharTable,G_N_ELEMENTS(s_CharTable),NULL,0);
74
75 return true;
76 }
77