[go: up one dir, main page]

Menu

[b5e4a4]: / remap.c  Maximize  Restore  History

Download this file

43 lines (32 with data), 571 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* $Id$
*
* by Imran Haider <imran@tangledwire.org>
*
* Copyright (C) Imran Haider
*
*/
#include "remap.h"
#include "gettext.h"
#include <stdio.h>
static char remap_table[127];
char *add_key_remap(char *replacement, char *original)
{
char old_key = *original;
int new_key = *replacement;
if (old_key > 0 && new_key > 0) {
remap_table[new_key] = old_key;
return NULL;
}
return _("remap key out of range");
}
const char *get_remap_table()
{
return remap_table;
}
void init_remap_table()
{
int i;
for (i=0; i<127; ++i)
remap_table[i] = i;
}