* Return the key combination as written in the list that enables * the selection of such keys on the control panel. */
| 168 | * the selection of such keys on the control panel. |
| 169 | */ |
| 170 | std::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. |
nothing calls this directly
no outgoing calls
no test coverage detected