1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--- scim-bridge-0.4.16/agent/scim-bridge-agent.cpp.bak 2009-03-08 21:07:29.000000000 +0800
+++ scim-bridge-0.4.16/agent/scim-bridge-agent.cpp 2010-09-11 22:59:34.476979479 +0800
@@ -542,6 +542,27 @@
scim_global_config_flush ();
scim_keyboard_layout = scim_get_default_keyboard_layout ();
+
+ // Hot key name, hot key config key.
+ // ! Update hotkey_list_length according to updated list length.
+ int hotkey_list_length = 6;
+ String hotkey_list[][2] = {
+ { "Toggle on/off - ", "/Hotkeys/FrontEnd/Trigger" },
+ { "Turn on - ", "/Hotkeys/FrontEnd/On" },
+ { "Turn off - ", "/Hotkeys/FrontEnd/Off" },
+ { "Next input method - ", "/Hotkeys/FrontEnd/NextFactory" },
+ { "Previous input method - ", "/Hotkeys/FrontEnd/PreviousFactory" },
+ { "Show input method menu - ", "/Hotkeys/FrontEnd/ShowFactoryMenu" }
+ };
+
+ // Undefined hot keys are hidden from help window.
+ String help_hotkeys = "\nGlobal Hotkeys:";
+ for ( int i = 0; i < hotkey_list_length; i++ ) {
+ String tmp_hotkeys = scim_config->read (String (hotkey_list[i][1]), String (""));
+ if ( tmp_hotkeys != "" )
+ help_hotkeys += "\n" + hotkey_list[i][0] + "<" + tmp_hotkeys + ">";
+ }
+ ScimBridgeAgentIMContext::set_help_hotkeys (help_hotkeys);
}
|