1
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:
S. Razi Alavizadeh 2012-08-22 21:21:25 +04:30
parent 413e61e9b6
commit 38456333a3

View File

@ -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();