/*
 * This file is part of roccat-tools.
 *
 * roccat-tools is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * roccat-tools is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with roccat-tools. If not, see <http://www.gnu.org/licenses/>.
 */

#include "ryos_gui_key_relations.h"
#include "ryos_key_combo_box.h"
#include <gaminggear/hid_uid.h>
#include <string.h>

RyosGuiKeyRelation const ryos_gui_key_relations[RYOS_KEY_RELATIONS_NUM] = {
	/* keys_macro */
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_TYPE_STANDARD_SHIFT_1, RYOS_KEY_TYPE_STANDARD_CTRL_1},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_TYPE_STANDARD_SHIFT_2, RYOS_KEY_TYPE_STANDARD_CTRL_2},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_TYPE_STANDARD_SHIFT_3, RYOS_KEY_TYPE_STANDARD_CTRL_3},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_TYPE_STANDARD_SHIFT_4, RYOS_KEY_TYPE_STANDARD_CTRL_4},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_TYPE_STANDARD_SHIFT_5, RYOS_KEY_TYPE_STANDARD_CTRL_5},

	/* keys_function */
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F1, RYOS_KEY_TYPE_MULTIMEDIA_MUTE},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F2, RYOS_KEY_TYPE_MULTIMEDIA_VOLUME_DOWN},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F3, RYOS_KEY_TYPE_MULTIMEDIA_VOLUME_UP},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F4, RYOS_KEY_TYPE_APP_CALCULATOR},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F5, RYOS_KEY_TYPE_MULTIMEDIA_PLAY_PAUSE},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F6, RYOS_KEY_TYPE_MULTIMEDIA_STOP},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F7, RYOS_KEY_TYPE_MULTIMEDIA_PREV_TRACK},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F8, RYOS_KEY_TYPE_MULTIMEDIA_NEXT_TRACK},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F9, RYOS_KEY_TYPE_APP_MY_COMPUTER},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F10, RYOS_KEY_TYPE_APP_BROWSER},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F11, RYOS_KEY_TYPE_LIGHT},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_F12, RYOS_KEY_TYPE_RECORD},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_PRINT_SCREEN, RYOS_KEY_TYPE_DISABLED},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_SCROLL_LOCK, RYOS_KEY_TYPE_DISABLED},
	{RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_PAUSE, RYOS_KEY_TYPE_SYSTEM_SLEEP},

	/* keys_thumbster */
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_TYPE_PROFILE_DOWN, HID_UID_KB_CAPS_LOCK},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_TYPE_OPEN_DRIVER, RYOS_KEY_TYPE_MULTIMEDIA_OPEN_PLAYER},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY, RYOS_KEY_TYPE_PROFILE_UP, RYOS_KEY_TYPE_APP_EMAIL},

	/* keys_easyzone */
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x35, 0x35},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x1e, 0x1e},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x1f, 0x1f},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x20, 0x20},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x21, 0x21},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x22, 0x22},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x23, 0x23},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x24, 0x24},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x25, 0x25},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x26, 0x26},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x27, 0x27},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x2d, 0x2d},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x2e, 0x2e},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x89, 0x89},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x2a, 0x2a},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x49, 0x49},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x4a, 0x4a},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x4b, 0x4b},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x53, 0x53},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x54, 0x54},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x55, 0x55},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x56, 0x56},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x2b, 0x2b},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x14, 0x14},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x1a, 0x1a},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x08, 0x08},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x15, 0x15},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x17, 0x17},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x1c, 0x1c},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x18, 0x18},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x0c, 0x0c},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x12, 0x12},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x13, 0x13},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x2f, 0x2f},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x30, 0x30},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x31, 0x31},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x4c, 0x4c},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x4d, 0x4d},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x4e, 0x4e},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x5f, 0x5f},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x60, 0x60},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x61, 0x61},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x57, 0x57},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x04, 0x04},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x16, 0x16},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x07, 0x07},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x09, 0x09},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x0a, 0x0a},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x0b, 0x0b},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x0d, 0x0d},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x0e, 0x0e},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x0f, 0x0f},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x33, 0x33},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x34, 0x34},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x32, 0x32},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x28, 0x28},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x5c, 0x5c},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x5d, 0x5d},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x5e, 0x5e},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe1, 0xe1},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x64, 0x64},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x1d, 0x1d},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x1b, 0x1b},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x06, 0x06},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x19, 0x19},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x05, 0x05},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x11, 0x11},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x10, 0x10},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x36, 0x36},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x37, 0x37},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x38, 0x38},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x87, 0x87},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe5, 0xe5},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x52, 0x52},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x59, 0x59},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x5a, 0x5a},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x5b, 0x5b},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x58, 0x58},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe0, 0xe0},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe3, 0xe3},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe2, 0xe2},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x8b, 0x8b},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x2c, 0x2c},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x8a, 0x8a},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x88, 0x88},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe6, 0xe6},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x65, 0x65},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0xe4, 0xe4},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x50, 0x50},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x51, 0x51},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x4f, 0x4f},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x62, 0x62},
	{RYOS_KEY_COMBO_BOX_GROUP_KEY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, 0x63, 0x63},

	/* keys_extra */
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_EXTENDED | RYOS_KEY_COMBO_BOX_GROUP_KEY, 0, HID_UID_KB_CAPS_LOCK, HID_UID_KB_CAPS_LOCK},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_TYPE_FN, RYOS_KEY_TYPE_FN},
	{RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, RYOS_KEY_COMBO_BOX_GROUP_PRIMARY | RYOS_KEY_COMBO_BOX_GROUP_TALK, HID_UID_KB_ESCAPE, HID_UID_KB_ESCAPE},
};

RyosGuiKeyPosition const ryos_gui_key_positions_macro[] = {
	{0, 0, 4, 0, 4}, {1, 4, 4, 0, 4}, {2, 8, 4, 0, 4}, {3, 12, 4, 0, 4}, {4, 16, 4, 0, 4},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const ryos_gui_key_positions_thumbster[] = {
	{20, 0, 4, 0, 4}, {21, 0, 4, 4, 4}, {22, 0, 4, 8, 4},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const ryos_gui_key_positions_function[] = {
	{ 5, 0, 4,  0, 4}, { 6, 0, 4,  4, 4}, { 7, 0, 4,  8, 4}, { 8, 0, 4, 12, 4},
	{ 9, 0, 4, 18, 4}, {10, 0, 4, 22, 4}, {11, 0, 4, 26, 4}, {12, 0, 4, 30, 4},
	{13, 0, 4, 36, 4}, {14, 0, 4, 40, 4}, {15, 0, 4, 44, 4}, {16, 0, 4, 48, 4},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const ryos_gui_key_positions_escape[] = {
	{118, 0, 4, 0, 4}, {RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const ryos_gui_key_positions_numpad[] = {
	{ 41,  0, 4, 0, 4}, { 42,  0, 4, 4, 4}, { 43,  0, 4, 8, 4}, { 44,  0, 4, 12, 4},
	{ 62,  4, 4, 0, 4}, { 63,  4, 4, 4, 4}, { 64,  4, 4, 8, 4}, { 65,  4, 8, 12, 4},
	{ 79,  8, 4, 0, 4}, { 80,  8, 4, 4, 4}, { 81,  8, 4, 8, 4},
	{ 97, 12, 4, 0, 4}, { 98, 12, 4, 4, 4}, { 99, 12, 4, 8, 4}, {100, 12, 8, 12, 4},
	{114, 16, 4, 0, 8},                     {115, 16, 4, 8, 4},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const ryos_gui_key_positions_arrows[] = {
	                   { 96, 0, 4, 4, 4},
	{111, 4, 4, 0, 4}, {112, 4, 4, 4, 4}, {113, 4, 4, 8, 4},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const ryos_gui_key_positions_block_above_arrows[] = {
	{ 17, 0, 4, 0, 4}, { 18, 0, 4, 4, 4}, { 19, 0, 4, 8, 4},
	{ 38, 5, 4, 0, 4}, { 39, 5, 4, 4, 4}, { 40, 5, 4, 8, 4},
	{ 59, 9, 4, 0, 4}, { 60, 9, 4, 4, 4}, { 61, 9, 4, 8, 4},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

static RyosGuiKeyPosition const ryos_gui_key_positions_main_generic[] = {
	{ 23,  0, 4,  0, 4}, { 24,  0, 4,  4, 4}, { 25,  0, 4,  8, 4}, { 26,  0, 4, 12, 4}, { 27,  0, 4, 16, 4},
	{ 28,  0, 4, 20, 4}, { 29,  0, 4, 24, 4}, { 30,  0, 4, 28, 4}, { 31,  0, 4, 32, 4}, { 32,  0, 4, 36, 4},
	{ 33,  0, 4, 40, 4}, { 34,  0, 4, 44, 4}, { 35,  0, 4, 48, 4}, { 36,  0, 4, 52, 4}, { 37,  0, 4, 56, 4},
	{ 45,  4, 4,  0, 6}, { 46,  4, 4,  6, 4}, { 47,  4, 4, 10, 4}, { 48,  4, 4, 14, 4}, { 49,  4, 4, 18, 4},
	{ 50,  4, 4, 22, 4}, { 51,  4, 4, 26, 4}, { 52,  4, 4, 30, 4}, { 53,  4, 4, 34, 4}, { 54,  4, 4, 38, 4},
	{ 55,  4, 4, 42, 4}, { 56,  4, 4, 46, 4}, { 57,  4, 4, 50, 4}, { 58,  4, 4, 54, 6},
	{116,  8, 4,  0, 7}, { 66,  8, 4,  7, 4}, { 67,  8, 4, 11, 4}, { 68,  8, 4, 15, 4}, { 69,  8, 4, 19, 4},
	{ 70,  8, 4, 23, 4}, { 71,  8, 4, 27, 4}, { 72,  8, 4, 31, 4}, { 73,  8, 4, 35, 4}, { 74,  8, 4, 39, 4},
	{ 75,  8, 4, 43, 4}, { 76,  8, 4, 47, 4}, { 77,  8, 4, 51, 4}, { 78,  8, 4, 55, 5},
	{ 82, 12, 4,  0, 5}, { 83, 12, 4,  5, 4}, { 84, 12, 4,  9, 4}, { 85, 12, 4, 13, 4}, { 86, 12, 4, 17, 4},
	{ 87, 12, 4, 21, 4}, { 88, 12, 4, 25, 4}, { 89, 12, 4, 29, 4}, { 90, 12, 4, 33, 4}, { 91, 12, 4, 37, 4},
	{ 92, 12, 4, 41, 4}, { 93, 12, 4, 45, 4}, { 94, 12, 4, 49, 4}, { 95, 12, 4, 53, 7},
	{101, 16, 4,  0, 6}, {102, 16, 4,  6, 4}, {103, 16, 4, 10, 5}, {104, 16, 4, 15, 4}, {105, 16, 4, 19,14},
	{106, 16, 4, 33, 4}, {107, 16, 4, 37, 4}, {108, 16, 4, 41, 5}, {117, 16, 4, 46, 4}, {109, 16, 4, 50, 4},
	{110, 16, 4, 54, 6},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

static RyosGuiKeyPosition const ryos_gui_key_positions_main_de[] = {
	{ 23,  0, 4,  0, 4}, { 24,  0, 4,  4, 4}, { 25,  0, 4,  8, 4}, { 26,  0, 4, 12, 4}, { 27,  0, 4, 16, 4},
	{ 28,  0, 4, 20, 4}, { 29,  0, 4, 24, 4}, { 30,  0, 4, 28, 4}, { 31,  0, 4, 32, 4}, { 32,  0, 4, 36, 4},
	{ 33,  0, 4, 40, 4}, { 34,  0, 4, 44, 4}, { 35,  0, 4, 48, 4}, { 37,  0, 4, 52, 8},
	{ 45,  4, 4,  0, 6}, { 46,  4, 4,  6, 4}, { 47,  4, 4, 10, 4}, { 48,  4, 4, 14, 4}, { 49,  4, 4, 18, 4},
	{ 50,  4, 4, 22, 4}, { 51,  4, 4, 26, 4}, { 52,  4, 4, 30, 4}, { 53,  4, 4, 34, 4}, { 54,  4, 4, 38, 4},
	{ 55,  4, 4, 42, 4}, { 56,  4, 4, 46, 4}, { 57,  4, 4, 50, 4}, { 78,  4, 8, 55, 5},
	{116,  8, 4,  0, 7}, { 66,  8, 4,  7, 4}, { 67,  8, 4, 11, 4}, { 68,  8, 4, 15, 4}, { 69,  8, 4, 19, 4},
	{ 70,  8, 4, 23, 4}, { 71,  8, 4, 27, 4}, { 72,  8, 4, 31, 4}, { 73,  8, 4, 35, 4}, { 74,  8, 4, 39, 4},
	{ 75,  8, 4, 43, 4}, { 76,  8, 4, 47, 4}, { 77,  8, 4, 51, 4},
	{ 82, 12, 4,  0, 5}, { 83, 12, 4,  5, 4}, { 84, 12, 4,  9, 4}, { 85, 12, 4, 13, 4}, { 86, 12, 4, 17, 4},
	{ 87, 12, 4, 21, 4}, { 88, 12, 4, 25, 4}, { 89, 12, 4, 29, 4}, { 90, 12, 4, 33, 4}, { 91, 12, 4, 37, 4},
	{ 92, 12, 4, 41, 4}, { 93, 12, 4, 45, 4}, { 95, 12, 4, 49,11},
	{101, 16, 4,  0, 6}, {102, 16, 4,  6, 4}, {103, 16, 4, 10, 5}, {105, 16, 4, 15,26}, {108, 16, 4, 41, 5},
	{117, 16, 4, 46, 4}, {109, 16, 4, 50, 4}, {110, 16, 4, 54, 6},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

static RyosGuiKeyPosition const ryos_gui_key_positions_main_us[] = {
	{ 23,  0, 4,  0, 4}, { 24,  0, 4,  4, 4}, { 25,  0, 4,  8, 4}, { 26,  0, 4, 12, 4}, { 27,  0, 4, 16, 4},
	{ 28,  0, 4, 20, 4}, { 29,  0, 4, 24, 4}, { 30,  0, 4, 28, 4}, { 31,  0, 4, 32, 4}, { 32,  0, 4, 36, 4},
	{ 33,  0, 4, 40, 4}, { 34,  0, 4, 44, 4}, { 35,  0, 4, 48, 4}, { 37,  0, 4, 52, 8},
	{ 45,  4, 4,  0, 6}, { 46,  4, 4,  6, 4}, { 47,  4, 4, 10, 4}, { 48,  4, 4, 14, 4}, { 49,  4, 4, 18, 4},
	{ 50,  4, 4, 22, 4}, { 51,  4, 4, 26, 4}, { 52,  4, 4, 30, 4}, { 53,  4, 4, 34, 4}, { 54,  4, 4, 38, 4},
	{ 55,  4, 4, 42, 4}, { 56,  4, 4, 46, 4}, { 57,  4, 4, 50, 4}, { 58,  4, 4, 54, 6},
	{116,  8, 4,  0, 7}, { 66,  8, 4,  7, 4}, { 67,  8, 4, 11, 4}, { 68,  8, 4, 15, 4}, { 69,  8, 4, 19, 4},
	{ 70,  8, 4, 23, 4}, { 71,  8, 4, 27, 4}, { 72,  8, 4, 31, 4}, { 73,  8, 4, 35, 4}, { 74,  8, 4, 39, 4},
	{ 75,  8, 4, 43, 4}, { 76,  8, 4, 47, 4}, { 78,  8, 4, 51, 9},
	{ 82, 12, 4,  0, 9}, { 84, 12, 4,  9, 4}, { 85, 12, 4, 13, 4}, { 86, 12, 4, 17, 4}, { 87, 12, 4, 21, 4},
	{ 88, 12, 4, 25, 4}, { 89, 12, 4, 29, 4}, { 90, 12, 4, 33, 4}, { 91, 12, 4, 37, 4}, { 92, 12, 4, 41, 4},
	{ 93, 12, 4, 45, 4}, { 95, 12, 4, 49,11},
	{101, 16, 4,  0, 6}, {102, 16, 4,  6, 4}, {103, 16, 4, 10, 5}, {105, 16, 4, 15,26}, {108, 16, 4, 41, 5},
	{117, 16, 4, 46, 4}, {109, 16, 4, 50, 4}, {110, 16, 4, 54, 6},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

static RyosGuiKeyPosition const ryos_gui_key_positions_main_jp[] = {
	{ 23,  0, 4,  0, 4}, { 24,  0, 4,  4, 4}, { 25,  0, 4,  8, 4}, { 26,  0, 4, 12, 4}, { 27,  0, 4, 16, 4},
	{ 28,  0, 4, 20, 4}, { 29,  0, 4, 24, 4}, { 30,  0, 4, 28, 4}, { 31,  0, 4, 32, 4}, { 32,  0, 4, 36, 4},
	{ 33,  0, 4, 40, 4}, { 34,  0, 4, 44, 4}, { 35,  0, 4, 48, 4}, { 36,  0, 4, 52, 4}, { 37,  0, 4, 56, 4},
	{ 45,  4, 4,  0, 6}, { 46,  4, 4,  6, 4}, { 47,  4, 4, 10, 4}, { 48,  4, 4, 14, 4}, { 49,  4, 4, 18, 4},
	{ 50,  4, 4, 22, 4}, { 51,  4, 4, 26, 4}, { 52,  4, 4, 30, 4}, { 53,  4, 4, 34, 4}, { 54,  4, 4, 38, 4},
	{ 55,  4, 4, 42, 4}, { 56,  4, 4, 46, 4}, { 57,  4, 4, 50, 4}, { 78,  4, 8, 55, 5},
	{116,  8, 4,  0, 7}, { 66,  8, 4,  7, 4}, { 67,  8, 4, 11, 4}, { 68,  8, 4, 15, 4}, { 69,  8, 4, 19, 4},
	{ 70,  8, 4, 23, 4}, { 71,  8, 4, 27, 4}, { 72,  8, 4, 31, 4}, { 73,  8, 4, 35, 4}, { 74,  8, 4, 39, 4},
	{ 75,  8, 4, 43, 4}, { 76,  8, 4, 47, 4}, { 77,  8, 4, 51, 4},
	{ 82, 12, 4,  0, 9}, { 84, 12, 4,  9, 4}, { 85, 12, 4, 13, 4}, { 86, 12, 4, 17, 4}, { 87, 12, 4, 21, 4},
	{ 88, 12, 4, 25, 4}, { 89, 12, 4, 29, 4}, { 90, 12, 4, 33, 4}, { 91, 12, 4, 37, 4}, { 92, 12, 4, 41, 4},
	{ 93, 12, 4, 45, 4}, { 94, 12, 4, 49, 4}, { 95, 12, 4, 53, 7},
	{101, 16, 4,  0, 6}, {102, 16, 4,  6, 4}, {103, 16, 4, 10, 5}, {104, 16, 4, 15, 4}, {105, 16, 4, 19,14},
	{106, 16, 4, 33, 4}, {107, 16, 4, 37, 4}, {108, 16, 4, 41, 5}, {117, 16, 4, 46, 4}, {109, 16, 4, 50, 4},
	{110, 16, 4, 54, 6},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

static RyosGuiKeyPosition const ryos_gui_key_positions_main_kr[] = {
	{ 23,  0, 4,  0, 4}, { 24,  0, 4,  4, 4}, { 25,  0, 4,  8, 4}, { 26,  0, 4, 12, 4}, { 27,  0, 4, 16, 4},
	{ 28,  0, 4, 20, 4}, { 29,  0, 4, 24, 4}, { 30,  0, 4, 28, 4}, { 31,  0, 4, 32, 4}, { 32,  0, 4, 36, 4},
	{ 33,  0, 4, 40, 4}, { 34,  0, 4, 44, 4}, { 35,  0, 4, 48, 4}, { 37,  0, 4, 52, 8},
	{ 45,  4, 4,  0, 6}, { 46,  4, 4,  6, 4}, { 47,  4, 4, 10, 4}, { 48,  4, 4, 14, 4}, { 49,  4, 4, 18, 4},
	{ 50,  4, 4, 22, 4}, { 51,  4, 4, 26, 4}, { 52,  4, 4, 30, 4}, { 53,  4, 4, 34, 4}, { 54,  4, 4, 38, 4},
	{ 55,  4, 4, 42, 4}, { 56,  4, 4, 46, 4}, { 57,  4, 4, 50, 4}, { 58,  4, 4, 54, 6},
	{116,  8, 4,  0, 7}, { 66,  8, 4,  7, 4}, { 67,  8, 4, 11, 4}, { 68,  8, 4, 15, 4}, { 69,  8, 4, 19, 4},
	{ 70,  8, 4, 23, 4}, { 71,  8, 4, 27, 4}, { 72,  8, 4, 31, 4}, { 73,  8, 4, 35, 4}, { 74,  8, 4, 39, 4},
	{ 75,  8, 4, 43, 4}, { 76,  8, 4, 47, 4}, { 78,  8, 4, 51, 9},
	{ 82, 12, 4,  0, 9}, { 84, 12, 4,  9, 4}, { 85, 12, 4, 13, 4}, { 86, 12, 4, 17, 4}, { 87, 12, 4, 21, 4},
	{ 88, 12, 4, 25, 4}, { 89, 12, 4, 29, 4}, { 90, 12, 4, 33, 4}, { 91, 12, 4, 37, 4}, { 92, 12, 4, 41, 4},
	{ 93, 12, 4, 45, 4}, { 95, 12, 4, 49,11},
	{101, 16, 4,  0, 6}, {102, 16, 4,  6, 4}, {103, 16, 4, 10, 5}, {104, 16, 4, 15, 4}, {105, 16, 4, 19,18},
	{107, 16, 4, 37, 4}, {108, 16, 4, 41, 5}, {117, 16, 4, 46, 4}, {109, 16, 4, 50, 4}, {110, 16, 4, 54, 6},
	{RYOS_GUI_KEY_POSITIONS_END, 0, 0, 0, 0},
};

RyosGuiKeyPosition const *ryos_gui_key_positions_get_main(gchar const *layout) {
	if (!strcmp(layout, "BE") ||
			!strcmp(layout, "CH") ||
			!strcmp(layout, "DE") ||
			!strcmp(layout, "ES") ||
			!strcmp(layout, "FR") ||
			!strcmp(layout, "HU") ||
			!strcmp(layout, "IT") ||
			!strcmp(layout, "LA") ||
			!strcmp(layout, "NO") ||
			!strcmp(layout, "PT") ||
			!strcmp(layout, "TR") ||
			!strcmp(layout, "UK") ||
			!strcmp(layout, "UK-SK-CZ"))
		return ryos_gui_key_positions_main_de;
	else if (!strcmp(layout, "JP"))
		return ryos_gui_key_positions_main_jp;
	else if (!strcmp(layout, "KR"))
		return ryos_gui_key_positions_main_kr;
	else if (!strcmp(layout, "RU") ||
			!strcmp(layout, "US"))
		return ryos_gui_key_positions_main_us;
	else
		return ryos_gui_key_positions_main_generic;
}

gchar *ryos_hid_to_special_keyname(guint8 hid) {
	gchar *text = NULL;

	switch(hid) {
	case 0xaa:
		text = "M1";
		break;
	case 0xab:
		text = "M2";
		break;
	case 0xac:
		text = "M3";
		break;
	case 0xad:
		text = "M4";
		break;
	case 0xae:
		text = "M5";
		break;
	case 0xf1:
		text = "FN";
		break;
	case 0xf2:
		text = "T1";
		break;
	case 0xf3:
		text = "T2";
		break;
	case 0xf4:
		text = "T3";
		break;
	default:
		break;
	}

	if (text)
		return g_strdup(text);
	else
		return NULL;
}
