Skip to content

Commit

Permalink
add US, German, French, keymap to input system
Browse files Browse the repository at this point in the history
 * add three tables and keymap.c:
     keyb_shift_table
     keyb_altgr_table
     keyb_translation_table (a lot of NIL)
 * move the update keyboard layout from mtk.git to flickernoise.git
  • Loading branch information
Xiangfu Liu committed May 20, 2011
1 parent 2e5ea6e commit 2ab05ed
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Expand Up @@ -13,7 +13,7 @@ OBJDIR=obj
BINDIR=bin

# base
OBJS=shellext.o sysconfig.o config.o fb.o input.o fbgrab.o shortcuts.o osc.o pngload.o flashvalid.o main.o
OBJS=shellext.o sysconfig.o config.o fb.o input.o keymap.o fbgrab.o shortcuts.o osc.o pngload.o flashvalid.o main.o

# GUI
OBJS+=messagebox.o filedialog.o resmgr.o guirender.o performance.o cp.o keyboard.o ir.o audio.o midi.o oscsettings.o dmxspy.o dmxdesk.o dmx.o videoin.o rsswall.o patcheditor.o monitor.o firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o
Expand Down
33 changes: 5 additions & 28 deletions src/input.c
Expand Up @@ -27,6 +27,7 @@
#include <mtklib.h>
#include <keycodes.h>

#include "keymap.h"
#include "input.h"

static inline void write_motion_event(mtk_event *e, int rel_x, int rel_y)
Expand Down Expand Up @@ -123,27 +124,6 @@ static int handle_mouse_event(mtk_event *e, unsigned char *msg)
return n;
}

/* translation table for scancode set 2 to scancode set 1 conversion */
static int keyb_translation_table[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* 00 */ 0xff, 0xff, 0xff, 0xff, 0x1e, 0x30, 0x2e, 0x20, 0x12, 0x21, 0x22, 0x23, 0x17, 0x24, 0x25, 0x26,
/* 10 */ 0x32, 0x31, 0x18, 0x19, 0x10, 0x13, 0x1f, 0x14, 0x16, 0x2f, 0x11, 0x2d, 0x15, 0x2c, 0x02, 0x03,
/* 20 */ 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x1c, 0x01, 0x0e, 0x0f, 0x39, 0x0c, 0x0d, 0x1a,
/* 30 */ 0x1b, 0x2b, 0x2b, 0x27, 0x28, 0x29, 0x33, 0x34, 0x35, 0xff, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
/* 40 */ 0x41, 0x42, 0x43, 0x44, 0x57, 0x58, 0xff, 0xff, 0xff, 0xff, 0x66, 0x68, 0x6f, 0x6b, 0x6d, 0x6a,
/* 50 */ 0x69, 0x6c, 0x67, 0xff, 0x62, 0x37, 0x4a, 0x4e, 0x60, 0x4f, 0x50, 0x51, 0x4b, 0x4c, 0x07, 0x47,
/* 60 */ 0x48, 0x49, 0x52, 0x53, 0x56, 0xff, 0xff, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* 70 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* 80 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* 90 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* a0 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* b0 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* c0 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* d0 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* e0 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* f0 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

static unsigned char old_modifiers;
static unsigned char old_keys[5];

Expand Down Expand Up @@ -200,10 +180,8 @@ static int handle_keybd_event(mtk_event *e, unsigned char *msg)
break;
}
if(!already_pressed) {
int k;

k = keyb_translation_table[msg[i+2]];
if(k != 0xff) {
int k = get_keycode(msg[0], msg[i+2]);
if(k != MTK_KEY_INVALID) {
write_press_event(e+n, k);
n++;
}
Expand All @@ -223,10 +201,9 @@ static int handle_keybd_event(mtk_event *e, unsigned char *msg)
break;
}
if(!still_pressed) {
int k;
int k = get_keycode(msg[0], old_keys[i]);

k = keyb_translation_table[old_keys[i]];
if(k != 0xff) {
if(k != MTK_KEY_INVALID) {
write_release_event(e+n, k);
n++;
}
Expand Down
187 changes: 187 additions & 0 deletions src/keymap.c
@@ -0,0 +1,187 @@
/*
* Flickernoise
* Copyright (C) 2011 Xiangfu Liu <xiangfu@sharism.cc>
*
* This program 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, version 3 of the License.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/

/* http://ascii-table.com/keyboards.php */

#include "keymap.h"
#include "sysconfig.h"

#define DEG MTK_KEY_DEG
#define PAR MTK_KEY_PAR
#define ET MTK_KEY_ET
#define UE MTK_KEY_UE
#define OE MTK_KEY_OE
#define AE MTK_KEY_AE
#define UUE MTK_KEY_UUE
#define UOE MTK_KEY_UOE
#define UAE MTK_KEY_UAE
#define MU MTK_KEY_MU
#define DI MTK_KEY_DI
#define S2 MTK_KEY_S2

#define EA MTK_KEY_EA
#define UEA MTK_KEY_UEA
#define DR MTK_KEY_DR
#define DL MTK_KEY_DL
#define PM MTK_KEY_PM
#define SU MTK_KEY_SU
#define AG6 MTK_KEY_AG6
#define CT MTK_KEY_CT
#define PD MTK_KEY_PD
#define HF MTK_KEY_HF
#define QT MTK_KEY_QT
#define PS MTK_KEY_PS

#define F1 MTK_KEY_F1
#define F2 MTK_KEY_F2
#define F3 MTK_KEY_F3
#define F4 MTK_KEY_F4
#define F5 MTK_KEY_F5
#define F6 MTK_KEY_F6
#define F7 MTK_KEY_F7
#define F8 MTK_KEY_F8
#define F9 MTK_KEY_F9
#define F10 MTK_KEY_F10
#define F11 MTK_KEY_F11
#define F12 MTK_KEY_F12

#define ESC MTK_KEY_ESC
#define TAB MTK_KEY_TAB
#define BSP MTK_KEY_BACKSPACE

#define CLC MTK_KEY_CAPSLOCK
#define NLC MTK_KEY_NUMLOCK

#define SRQ MTK_KEY_SYSRQ
#define SLC MTK_KEY_SCROLLLOCK
#define PAU MTK_KEY_PAUSE

#define UP MTK_KEY_UP
#define LFT MTK_KEY_LEFT
#define DWN MTK_KEY_DOWN
#define RIT MTK_KEY_RIGHT

#define PUP MTK_KEY_PAGEUP
#define PDW MTK_KEY_PAGEDOWN
#define HME MTK_KEY_HOME
#define END MTK_KEY_END
#define INT MTK_KEY_INSERT
#define DEL MTK_KEY_DELETE

#define NL MTK_KEY_ENTER

#define NIL MTK_KEY_INVALID
/* translation table for scancode set 2 to scancode set 1 conversion */
static int keyb_translation_table[3][112] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
{
/* 00 */ NIL, NIL, NIL, NIL, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
/* 10 */ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'z', 'y', '1', '2',
/* 20 */ '3', '4', '5', '6', '7', '8', '9', '0', NL, ESC, BSP, TAB, ' ', ET, NIL, UE,
/* 30 */ '+', NIL, '#', OE, AE, '^', ',', '.', '-', CLC, F1, F2, F3, F4, F5, F6,
/* 40 */ F7, F8, F9, F10, F11, F12, SRQ, SLC, PAU, INT, HME, PUP, DEL, END, PDW, RIT,
/* 50 */ LFT, DWN, UP, NLC, DI, '*', '-', '+', NL, '1', '2', '3', '4', '5', '6', '7',
/* 60 */ '8', '9', '0', '.', '<', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
},{ /* German layout 129 */
/* 00 */ NIL, NIL, NIL, NIL, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
/* 10 */ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2',
/* 20 */ '3', '4', '5', '6', '7', '8', '9', '0', NL, ESC, BSP, TAB, ' ', '-', '=', '^',
/* 30 */ NIL, '<', NIL, ';', '`', '#', ',', '.', EA, CLC, F1, F2, F3, F4, F5, F6,
/* 40 */ F7, F8, F9, F10, F11, F12, SRQ, SLC, PAU, INT, HME, PUP, DEL, END, PDW, RIT,
/* 50 */ LFT, DWN, UP, NLC, DI, '*', '-', '+', NL, '1', '2', '3', '4', '5', '6', '7',
/* 60 */ '8', '9', '0', '.', DR, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
},{ /* French layout 058 */
/* 00 */ NIL, NIL, NIL, NIL, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
/* 10 */ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2',
/* 20 */ '3', '4', '5', '6', '7', '8', '9', '0', NL, ESC, BSP, TAB, ' ', '-', '=', '[',
/* 30 */ ']','\\', NIL, ';','\'', '`', ',', '.', '/', CLC, F1, F2, F3, F4, F5, F6,
/* 40 */ F7, F8, F9, F10, F11, F12, SRQ, SLC, PAU, INT, HME, PUP, DEL, END, PDW, RIT,
/* 50 */ LFT, DWN, UP, NLC, '/', '*', '-', '+', NL, '1', '2', '3', '4', '5', '6', '7',
/* 60 */ '8', '9', '0', '.', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
} /* US layout 103P */
};

static int keyb_shift_table[3][112] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
{
/* 00 */ NIL, NIL, NIL, NIL, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
/* 10 */ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Z', 'Y', '!','\"',
/* 20 */ PAR, '$', '%', '&', '/', '(', ')', '=', NIL, NIL, NIL, NIL, NIL, '?', '`', UUE,
/* 30 */ '*', NIL,'\'', UOE, UAE, DEG, ';', ':', '_', NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 40 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 50 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 60 */ NIL, NIL, NIL, NIL, '>', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
},{
/* 00 */ NIL, NIL, NIL, NIL, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
/* 10 */ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '!', NIL,
/* 20 */ '/', '$', '%', '?', '&', '*', '(', ')', NIL, NIL, NIL, NIL, NIL, '_', '+', NIL,
/* 30 */ NIL, '>', NIL, ':', NIL, '|','\'','\"', UEA, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 40 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 50 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 60 */ NIL, NIL, NIL, NIL, DL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
},{
/* 00 */ NIL, NIL, NIL, NIL, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
/* 10 */ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@',
/* 20 */ '#', '$', '%', '^', '&', '*', '(', ')', NIL, NIL, NIL, NIL, NIL, '_', '+', '{',
/* 30 */ '}', '|', NIL, ':','\"', '~', '<', '>', '?', NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 40 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 50 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 60 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
}
};

static int keyb_altgr_table[2][112] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
{
/* 00 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 10 */ MU, NIL, NIL, NIL, '@', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, S2,
/* 20 */ NIL, NIL, NIL, NIL, '{', '[', ']', '}', NIL, NIL, NIL, NIL, NIL,'\\', NIL, NIL,
/* 30 */ '~', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 40 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 50 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 60 */ NIL, NIL, NIL, NIL, '|', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
},{
/* 00 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 10 */ MU, NIL, PAR, PS, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, PM, '@',
/* 20 */ PD, CT, SU, AG6, '|', S2, NIL, QT, NIL, NIL, NIL, NIL, NIL, HF, NIL, '[',
/* 30 */ ']', '}', NIL, '~', '{','\\', NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 40 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 50 */ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
/* 60 */ NIL, NIL, NIL, NIL, DEG, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
}
};

int get_keycode(unsigned char modifiers, int scan_code)
{
static unsigned int curr_layout;
int k = NIL;

if(scan_code>112) return NIL;

curr_layout = sysconfig_get_keyboard_layout();

if(modifiers & 0x20 || modifiers & 0x02)
k = keyb_shift_table[curr_layout][scan_code];
else if((modifiers & 0x40) &&
(curr_layout == SC_KEYBOARD_LAYOUT_GERMAN || curr_layout == SC_KEYBOARD_LAYOUT_FRENCH))
k = keyb_altgr_table[curr_layout][scan_code];
else
k = keyb_translation_table[curr_layout][scan_code];

return k;
}

25 changes: 25 additions & 0 deletions src/keymap.h
@@ -0,0 +1,25 @@
/*
* Flickernoise
* Copyright (C) 2011 Xiangfu Liu <xiangfu@sharism.cc>
*
* This program 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, version 3 of the License.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __KEYMAP_H
#define __KEYMAP_H

#include <keycodes.h>

int get_keycode(unsigned char modifiers, int scan_code);

#endif
1 change: 0 additions & 1 deletion src/main.c
Expand Up @@ -82,7 +82,6 @@ static rtems_task gui_task(rtems_task_argument argument)
{
init_fb_mtk(sysconfig_get_autostart_mode() != SC_AUTOSTART_NONE);
sysconfig_set_mtk_wallpaper();
sysconfig_set_mtk_keyboard_layout();
init_input();
input_add_callback(mtk_input);
init_shortcuts();
Expand Down
8 changes: 1 addition & 7 deletions src/sysconfig.c
Expand Up @@ -132,7 +132,7 @@ static struct sysconfig sysconfig = {
.version = SYSCONFIG_VERSION,
.resolution = SC_RESOLUTION_640_480,
.language = SC_LANGUAGE_ENGLISH,
.keyboard_layout = MTK_KEYBOARD_LAYOUT_GERMAN,
.keyboard_layout = SC_KEYBOARD_LAYOUT_GERMAN,
.dhcp_enable = 1,
.ip = 0xc0a8002a,
.netmask = 0xffffff00,
Expand Down Expand Up @@ -425,15 +425,9 @@ void sysconfig_set_language(int language)
sysconfig.language = language;
}

void sysconfig_set_mtk_keyboard_layout()
{
mtk_config_set_keyboard_layout(sysconfig.keyboard_layout);
}

void sysconfig_set_keyboard_layout(int layout)
{
sysconfig.keyboard_layout = layout;
sysconfig_set_mtk_keyboard_layout();
}

static int dhcp_task_running;
Expand Down
7 changes: 6 additions & 1 deletion src/sysconfig.h
Expand Up @@ -32,6 +32,12 @@ enum {
SC_LANGUAGE_GERMAN
};

enum {
SC_KEYBOARD_LAYOUT_GERMAN = 0,
SC_KEYBOARD_LAYOUT_FRENCH = 1,
SC_KEYBOARD_LAYOUT_US = 2,
};

enum {
SC_AUTOSTART_NONE,
SC_AUTOSTART_SIMPLE,
Expand All @@ -57,7 +63,6 @@ void sysconfig_set_wallpaper(char *wallpaper);
void sysconfig_set_mtk_wallpaper();
void sysconfig_set_language(int language);
void sysconfig_set_keyboard_layout(int layout);
void sysconfig_set_mtk_keyboard_layout();
void sysconfig_set_ipconfig(int dhcp_enable, unsigned int ip, unsigned int netmask, unsigned int gateway, unsigned int dns1, unsigned int dns2);
void sysconfig_set_credentials(char *login, char *password);
void sysconfig_set_autostart_mode(int autostart_mode);
Expand Down
12 changes: 6 additions & 6 deletions src/sysettings.c
Expand Up @@ -286,9 +286,9 @@ void init_sysettings()
mtk_bind(appid, "b_lang_french", "press", language_callback, (void *)SC_LANGUAGE_FRENCH);
mtk_bind(appid, "b_lang_german", "press", language_callback, (void *)SC_LANGUAGE_GERMAN);

mtk_bind(appid, "b_kbd_us", "press", layout_callback, (void *)MTK_KEYBOARD_LAYOUT_US);
mtk_bind(appid, "b_kbd_french", "press", layout_callback, (void *)MTK_KEYBOARD_LAYOUT_FRENCH);
mtk_bind(appid, "b_kbd_german", "press", layout_callback, (void *)MTK_KEYBOARD_LAYOUT_GERMAN);
mtk_bind(appid, "b_kbd_us", "press", layout_callback, (void *)SC_KEYBOARD_LAYOUT_US);
mtk_bind(appid, "b_kbd_french", "press", layout_callback, (void *)SC_KEYBOARD_LAYOUT_FRENCH);
mtk_bind(appid, "b_kbd_german", "press", layout_callback, (void *)SC_KEYBOARD_LAYOUT_GERMAN);

mtk_bind(appid, "b_dhcp", "press", dhcp_callback, NULL);

Expand Down Expand Up @@ -338,9 +338,9 @@ static void update_layout()

layout = sysconfig_get_keyboard_layout();

mtk_cmdf(appid, "b_kbd_us.set(-state %s)", layout == MTK_KEYBOARD_LAYOUT_US ? "on" : "off");
mtk_cmdf(appid, "b_kbd_french.set(-state %s)", layout == MTK_KEYBOARD_LAYOUT_FRENCH ? "on" : "off");
mtk_cmdf(appid, "b_kbd_german.set(-state %s)", layout == MTK_KEYBOARD_LAYOUT_GERMAN ? "on" : "off");
mtk_cmdf(appid, "b_kbd_us.set(-state %s)", layout == SC_KEYBOARD_LAYOUT_US ? "on" : "off");
mtk_cmdf(appid, "b_kbd_french.set(-state %s)", layout == SC_KEYBOARD_LAYOUT_FRENCH ? "on" : "off");
mtk_cmdf(appid, "b_kbd_german.set(-state %s)", layout == SC_KEYBOARD_LAYOUT_GERMAN ? "on" : "off");
}

static void update_network()
Expand Down

0 comments on commit 2ab05ed

Please sign in to comment.