| 311 | } |
| 312 | |
| 313 | void EFIKeySequence::fixShiftState() |
| 314 | { |
| 315 | bool has_upper = false; |
| 316 | bool has_unicode = false; |
| 317 | for(auto &key: keys) |
| 318 | { |
| 319 | has_unicode |= key.isUnicode(); |
| 320 | key = key.toUpper(); |
| 321 | has_upper |= key.isUpper(); |
| 322 | } |
| 323 | |
| 324 | if(!has_unicode || has_upper) |
| 325 | shift_state.insert(Qt::Key_Shift); |
| 326 | |
| 327 | else // has unicode chars but no uppercase -> no Shift press necessary |
| 328 | shift_state.remove(Qt::Key_Shift); |
| 329 | } |