MCPcopy Create free account
hub / github.com/clementgallet/libTAS / default_inputs

Method default_inputs

src/program/KeyMappingXcb.cpp:208–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void KeyMappingXcb::default_inputs()
209{
210 input_mapping.clear();
211
212 /* Map all keycode to their respective keysym. The other keysyms are unmapped. */
213
214 /* Gather the list of valid X11 KeyCode values */
215 xcb_keycode_t min_keycode = xcb_get_setup(conn)->min_keycode;
216 xcb_keycode_t max_keycode = xcb_get_setup(conn)->max_keycode;
217
218 for (int k=min_keycode; k<=max_keycode; k++) {
219 xcb_keysym_t ks = xcb_key_symbols_get_keysym(keysyms, k, 0);
220 if (ks == XCB_NO_SYMBOL) continue;
221
222 for (auto iter : input_list[INPUTLIST_KEYBOARD_LATIN])
223 if (iter.which == ks) {
224 input_mapping[iter.which] = iter;
225 break;
226 }
227
228 for (auto iter : input_list[INPUTLIST_KEYBOARD_MISC])
229 if (iter.which == ks) {
230 input_mapping[iter.which] = iter;
231 break;
232 }
233
234 }
235}
236
237void KeyMappingXcb::default_input(int tab, int input_index)
238{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected