Index: trunk/extensions/Narayam/js/ext.narayam.core.js |
— | — | @@ -35,14 +35,8 @@ |
36 | 36 | var allImes = mw.config.get( 'wgNarayamAllSchemes' ) || {}; |
37 | 37 | // Currently selected scheme |
38 | 38 | var currentScheme = null; |
39 | | - // Shortcut key for turning Narayam on and off |
40 | | - var shortcutKey = mw.config.get( 'wgNarayamShortcutKey' ) || { |
41 | | - altKey: false, |
42 | | - ctrlKey: false, |
43 | | - shiftKey: false, |
44 | | - key: null |
45 | | - }; |
46 | 39 | |
| 40 | + |
47 | 41 | /* Private functions */ |
48 | 42 | |
49 | 43 | /** |
— | — | @@ -118,10 +112,8 @@ |
119 | 113 | * @return bool |
120 | 114 | */ |
121 | 115 | function isShortcutKey( e ) { |
122 | | - return e.altKey == shortcutKey.altKey && |
123 | | - e.ctrlKey == shortcutKey.ctrlKey && |
124 | | - e.shiftKey == shortcutKey.shiftKey && |
125 | | - String.fromCharCode( e.which ).toLowerCase() == shortcutKey.key.toLowerCase(); |
| 116 | + return e.ctrlKey && |
| 117 | + String.fromCharCode( e.which ).toLowerCase() == 'm'; |
126 | 118 | } |
127 | 119 | |
128 | 120 | /** |
— | — | @@ -129,18 +121,8 @@ |
130 | 122 | * @return string |
131 | 123 | */ |
132 | 124 | function shortcutText() { |
133 | | - var text = ''; |
134 | | - // TODO: Localize these things (in core, too) |
135 | | - if ( shortcutKey.ctrlKey ) { |
136 | | - text += 'Ctrl-'; |
137 | | - } |
138 | | - if ( shortcutKey.shiftKey ) { |
139 | | - text += 'Shift-'; |
140 | | - } |
141 | | - if ( shortcutKey.altKey ) { |
142 | | - text += 'Alt-'; |
143 | | - } |
144 | | - text += shortcutKey.key.toUpperCase(); |
| 125 | + var text = 'Ctrl-M'; |
| 126 | + // TODO: Address Bug #31026 |
145 | 127 | return text; |
146 | 128 | } |
147 | 129 | |
Index: trunk/extensions/Narayam/Narayam.php |
— | — | @@ -32,14 +32,6 @@ |
33 | 33 | // Whether the input method should be active as default or not |
34 | 34 | $wgNarayamEnabledByDefault = true; |
35 | 35 | |
36 | | -// Shortcut key for enabling and disabling Narayam |
37 | | -// Defaults to Ctrl+M |
38 | | -$wgNarayamShortcutKey = array( |
39 | | - 'altKey' => false, |
40 | | - 'ctrlKey' => true, |
41 | | - 'shiftKey' => false, |
42 | | - 'key' => 'm' |
43 | | -); |
44 | 36 | |
45 | 37 | // Array mapping language codes and scheme names to module names |
46 | 38 | // Custom schemes can be added here |
Index: trunk/extensions/Narayam/Narayam.hooks.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | } |
27 | 27 | |
28 | 28 | public static function addConfig( &$vars ) { |
29 | | - global $wgNarayamEnabledByDefault, $wgNarayamShortcutKey, $wgUser; |
| 29 | + global $wgNarayamEnabledByDefault, $wgUser; |
30 | 30 | |
31 | 31 | if ( $wgUser->getOption( 'narayamDisable' ) ) { |
32 | 32 | // User disabled Narayam |
— | — | @@ -33,7 +33,6 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | $vars['wgNarayamEnabledByDefault'] = $wgNarayamEnabledByDefault; |
37 | | - $vars['wgNarayamShortcutKey'] = $wgNarayamShortcutKey; |
38 | 37 | |
39 | 38 | return true; |
40 | 39 | } |