g13 tux logo   g13

keymap.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2009 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the g13 library.                                 *
00006  *                                                                         *
00007  *   The g13 library is free software; you can redistribute it and/or      *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The g13 library is distributed in the hope that it will be            *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef G13_KEYMAP_H
00020 #define G13_KEYMAP_H
00021 
00022 #include <g13/udev.h>
00023 
00024 #include <stdint.h>
00025 
00026 #define G13_KEYS (35)
00027 #define G13_KEYMAP_SIZE (G13_KEYS*3)
00028 #define G13_KEYMAP_0_INDEX (0)
00029 #define G13_KEYMAP_1_INDEX (G13_KEYS)
00030 #define G13_KEYMAP_2_INDEX (G13_KEYS*2)
00031 
00036 int g13_device_get_keymap_index( g13_device* device );
00037 
00043 int g13_device_set_keymap_index( g13_device* device, int keymap );
00044 
00052 int g13_device_set_keymap( g13_device* device, uint32_t scancode, uint32_t keycode );
00053 
00062 int g13_device_set_keymap_from_array( g13_device* device, uint32_t* keymap );
00063 
00072 int g13_device_set_keymap_from_arrays( g13_device* device, uint32_t* scancodes, uint32_t* keycodes, int pairs );
00073 
00086 int g13_device_set_keymap_from_string( g13_device* device, const char* scancodes, size_t n );
00087 
00106 int g13_device_set_keymap_from_file( g13_device* device, const char* filename );
00107 
00120 uint32_t* g13_device_get_keymap( g13_device* device );
00121 
00128 void g13_device_free_keymap(uint32_t* keymap);
00129 
00141 int g13_device_get_keymap_switching( g13_device* device );
00142 
00149 int g13_device_set_keymap_switching( g13_device* device, int enabled );
00150 
00151 #endif

Generated on Wed Mar 24 10:13:17 2010 for g13 by doxygen 1.6.1