|
Lines 185-190
Link Here
|
| 185 |
# define LK_RET() return |
185 |
# define LK_RET() return |
| 186 |
#endif |
186 |
#endif |
| 187 |
|
187 |
|
|
|
188 |
|
| 189 |
|
| 190 |
|
| 191 |
#define CARON 0xfe5a |
| 192 |
#define ACUTE 0xfe51 |
| 193 |
|
| 194 |
static KeySym dead_key_previous = 0; |
| 195 |
|
| 196 |
#define CHARS 8 |
| 197 |
KeySym TransformTable[CHARS][3] = { |
| 198 |
{0x74,0xbb,CARON}, //t |
| 199 |
{0x6e,0xf2,CARON}, //n |
| 200 |
{0x64,0xef,CARON}, //d |
| 201 |
{0x54,0xab,CARON}, //T |
| 202 |
{0x4e,0xd2,CARON}, //N |
| 203 |
{0x44,0xcf,CARON}, //D |
| 204 |
{0x6f,0xf3,ACUTE}, //o |
| 205 |
{0x4f,0xd3,ACUTE}, //O |
| 206 |
}; |
| 207 |
|
| 208 |
/* Transform key according to given dead key. |
| 209 |
Restricted to czech keyboard. */ |
| 210 |
void |
| 211 |
transform_with_dead_key(KeySym * key,KeySym dead_key) |
| 212 |
{ |
| 213 |
int i; |
| 214 |
for (i=0; i<CHARS; i++) |
| 215 |
if (*key==TransformTable[i][0] && dead_key==TransformTable[i][2]) { *key = TransformTable[i][1]; return; } |
| 216 |
|
| 217 |
} |
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 188 |
/* This function is called for every keypress event we receive. Its job is to convert |
222 |
/* This function is called for every keypress event we receive. Its job is to convert |
| 189 |
the keypress into its corresponding action. It is responsible for calling the action |
223 |
the keypress into its corresponding action. It is responsible for calling the action |
| 190 |
bindings routine to see if there is an action binding for that keysym; if there is, |
224 |
bindings routine to see if there is an action binding for that keysym; if there is, |
|
Lines 282-287
Link Here
|
| 282 |
if (valid_keysym) { |
317 |
if (valid_keysym) { |
| 283 |
#endif |
318 |
#endif |
| 284 |
|
319 |
|
|
|
320 |
/* Transform keysym according to previous dead key */ |
| 321 |
if (keysym==CARON || keysym==ACUTE) { dead_key_previous=keysym; return; } |
| 322 |
if (dead_key_previous) { |
| 323 |
transform_with_dead_key(&keysym, dead_key_previous); |
| 324 |
kbuf[0]=keysym;kbuf[1]=0; |
| 325 |
dead_key_previous = 0; |
| 326 |
} |
| 327 |
|
| 285 |
/* Check for a corresponding action binding. If there is one, we're done with this event. */ |
328 |
/* Check for a corresponding action binding. If there is one, we're done with this event. */ |
| 286 |
if (action_dispatch(ev, keysym)) { |
329 |
if (action_dispatch(ev, keysym)) { |
| 287 |
LK_RET(); |
330 |
LK_RET(); |