10 extern unsigned sys_keymap[];
12 unsigned key_from_sys(unsigned code)
14 static bool init_done = false;
15 static map<unsigned, unsigned> reverse_map;
19 for(unsigned i=0; i<N_KEYS_; ++i)
21 reverse_map[sys_keymap[i]] = i;
26 map<unsigned, unsigned>::const_iterator i = reverse_map.find(code);
27 if(i!=reverse_map.end())
33 unsigned key_to_sys(unsigned key)
36 throw invalid_argument("key_to_sys");
37 return sys_keymap[key];