MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetNextEngineKeys

Method GetNextEngineKeys

cpp/imehandler/windows/src/winapihandler.cc:170–197  ·  view source on GitHub ↗

* Return the key combination as written in the list that enables * the selection of such keys on the control panel. */

Source from the content-addressed store, hash-verified

168 * the selection of such keys on the control panel.
169 */
170std::string WinapiHandler::GetNextEngineKeys() const {
171 std::string keys = "";
172 HKEY key;
173 if(RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Keyboard Layout"), 0,
174 KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) {
175 char val[2];
176 DWORD nb_bytes = sizeof(val);
177 if(RegGetValue(key, "Toggle", "Hotkey", RRF_RT_REG_SZ, NULL, &val,
178 &nb_bytes) == ERROR_SUCCESS) {
179 switch (atoi(val)) {
180 case 1:
181 keys = "LEFT ALT+SHIFT";
182 break;
183 case 2:
184 keys = "CTRL+SHIFT";
185 break;
186 case 3:
187 keys = "NOT ASSIGNED";
188 break;
189 case 4:
190 keys = "GRAVE ACCENT";
191 break;
192 }
193 }
194 RegCloseKey(key);
195 }
196 return keys;
197}
198
199/*
200 * Returns the HKL of loaded engines.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected