mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Improved, AKN_Handler
handles pressed key case-insensitive if it's possible.
This commit is contained in:
parent
413e61e9b6
commit
38456333a3
@ -175,6 +175,20 @@ void AKN_Handler::handleAccessKey(QKeyEvent* event)
|
||||
|
||||
QChar key = text.at(0);
|
||||
|
||||
QChar other(QChar::Null);
|
||||
if (key.isLower()) {
|
||||
other = key.toUpper();
|
||||
}
|
||||
else if (key.isUpper()) {
|
||||
other = key.toLower();
|
||||
}
|
||||
|
||||
if (!other.isNull()
|
||||
&& m_accessKeyNodes.contains(other)
|
||||
&& !m_accessKeyNodes.contains(key)) {
|
||||
key = other;
|
||||
}
|
||||
|
||||
if (m_accessKeyNodes.contains(key)) {
|
||||
QWebElement element = m_accessKeyNodes[key];
|
||||
QPoint p = element.geometry().center();
|
||||
|
Loading…
Reference in New Issue
Block a user