Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
-
None
Description
(Sorry for the poor code formatting. Whatever tool this is, it keeps deleting my line breaks, changing text randomly to "unknown macro", and placing curly braces in weird places. )
consider the following code:
const QMetaEnum &keyEnum = QMetaEnum::fromType<Qt::Key>();
QTextStream(stdout) << keyEnum.valueToKey(getchar()) << endl;
The only thing you do not really see in this code is that getchar() from <stdio.h> no longer waits for a newline before pushing on its integer to me. That being achieved though, I have been able to start building a curses-esque type of library. This means I can do things like
switch(ch) { case Key_Escape: endProgram(); }
As getchar() is accurately interpreted by your enumerator, even on my highly modified layout. What is missing however are the lower case letters, and my request is that they should be added so I can nicely reference them in switch statements, and for debugging purposes using
QMetaEnum.valueToKey
Attachments
Issue Links
- relates to
-
QTBUG-93858 Some XKB letter keysyms are not properly converted to corresponding Qt keys
- Closed