Version: (using KDE KDE 3.4.1) Installed from: Gentoo Packages OS: Linux I'm currently not disabled in some way that makes access keys useful to me, so I don't use them on the few web sites that have them. On the other hand, I do use Ctrl frequently to switch tabs or desktops, and I'm annoyed when pressing Ctrl turns on access keys and makes it so I have to do an additional keystroke to turn off the access key so I could, say, scroll down the page I'm viewing. If there already is a way to turn off access keys, it should be documented in the Konqueror help file.
I'm adding functionality to disable this by putting this in ~/.kde/share/config/khtmlrc: [Access Keys] Enabled=false
SVN commit 440572 by kling: Added khtmlrc option to disable toggling/display of access keys with the CTRL key. BUG: 109404 M +11 -0 khtml_settings.cc M +3 -0 khtml_settings.h M +11 -7 khtmlview.cpp --- branches/KDE/3.5/kdelibs/khtml/khtml_settings.cc #440571:440572 @@ -84,6 +84,7 @@ bool m_adFilterEnabled : 1; bool m_hideAdsEnabled : 1; bool m_jsPopupBlockerPassivePopup : 1; + bool m_accessKeysEnabled : 1; // the virtual global "domain" KPerDomainSettings global; @@ -312,6 +313,11 @@ d->m_bBackRightClick = config->readBoolEntry( "BackRightClick", false ); } + if (reset || config->hasGroup("Access Keys")) { + config->setGroup( "Access Keys" ); + d->m_accessKeysEnabled = config->readBoolEntry( "Enabled", true ); + } + if (reset || config->hasGroup("Filter Settings")) { config->setGroup( "Filter Settings" ); @@ -690,6 +696,11 @@ return d->m_bBackRightClick; } +bool KHTMLSettings::accessKeysEnabled() const +{ + return d->m_accessKeysEnabled; +} + bool KHTMLSettings::isAdFilterEnabled() const { return d->m_adFilterEnabled; --- branches/KDE/3.5/kdelibs/khtml/khtml_settings.h #440571:440572 @@ -176,6 +176,9 @@ bool isHideAdsEnabled() const; void addAdFilter( const QString &url ); + // Access Keys + bool accessKeysEnabled() const; + KJSWindowOpenPolicy windowOpenPolicy( const QString& hostname = QString::null ) const; KJSWindowMovePolicy windowMovePolicy( const QString& hostname = QString::null ) const; KJSWindowResizePolicy windowResizePolicy( const QString& hostname = QString::null ) const; --- branches/KDE/3.5/kdelibs/khtml/khtmlview.cpp #440571:440572 @@ -253,6 +253,7 @@ #endif // KHTML_NO_TYPE_AHEAD_FIND accessKeysActivated = false; accessKeysPreActivate = false; + accessKeysEnabled = KHTMLFactory::defaultHTMLSettings()->accessKeysEnabled(); emitCompletedAfterRepaint = CSNone; } void newScrollTimer(QWidget *view, int tid) @@ -371,6 +372,7 @@ bool findLinksOnly; bool typeAheadActivated; #endif // KHTML_NO_TYPE_AHEAD_FIND + bool accessKeysEnabled; bool accessKeysActivated; bool accessKeysPreActivate; CompletedState emitCompletedAfterRepaint; @@ -538,7 +540,7 @@ if( d->typeAheadActivated ) findTimeout(); - if (d->accessKeysActivated) + if (d->accessKeysEnabled && d->accessKeysActivated) accessKeysTimeout(); viewport()->unsetCursor(); if ( d->cursor_icon_widget ) @@ -797,7 +799,7 @@ showCaret(); }/*end if*/ #endif - if (d->accessKeysActivated) { + if (d->accessKeysEnabled && d->accessKeysActivated) { emit hideAccessKeys(); displayAccessKeys(); } @@ -1385,7 +1387,7 @@ #endif // KHTML_NO_CARET // If CTRL was hit, be prepared for access keys - if (_ke->key() == Key_Control && _ke->state()==0 && !d->accessKeysActivated) d->accessKeysPreActivate=true; + if (d->accessKeysEnabled && _ke->key() == Key_Control && _ke->state()==0 && !d->accessKeysActivated) d->accessKeysPreActivate=true; if (_ke->key() == Key_Shift && _ke->state()==0) d->scrollSuspendPreActivate=true; @@ -1393,7 +1395,7 @@ // accesskey handling needs to be done before dispatching, otherwise e.g. lineedits // may eat the event - if (d->accessKeysActivated) + if (d->accessKeysEnabled && d->accessKeysActivated) { if (_ke->state()==0 || _ke->state()==ShiftButton) { if (_ke->key() != Key_Shift) accessKeysTimeout(); @@ -1646,6 +1648,7 @@ return; } + if (d->accessKeysEnabled) { if (d->accessKeysPreActivate && _ke->key() != Key_Control) d->accessKeysPreActivate=false; if (_ke->key() == Key_Control && d->accessKeysPreActivate && _ke->state() == Qt::ControlButton && !(KApplication::keyboardMouseState() & Qt::ControlButton)) { @@ -1655,6 +1658,7 @@ d->accessKeysPreActivate = false; } else if (d->accessKeysActivated) accessKeysTimeout(); + } if( d->scrollSuspendPreActivate && _ke->key() != Key_Shift ) d->scrollSuspendPreActivate = false; @@ -2982,7 +2986,7 @@ default: break; } - if (d->accessKeysPreActivate && button!=-1) + if (d->accessKeysEnabled && d->accessKeysPreActivate && button!=-1) d->accessKeysPreActivate=false; bool ctrlKey = (_mouse->state() & ControlButton); @@ -3078,7 +3082,7 @@ void KHTMLView::viewportWheelEvent(QWheelEvent* e) { - if (d->accessKeysPreActivate) d->accessKeysPreActivate=false; + if (d->accessKeysEnabled && d->accessKeysPreActivate) d->accessKeysPreActivate=false; if ( ( e->state() & ControlButton) == ControlButton ) { @@ -3360,7 +3364,7 @@ if ( (w = d->visibleWidgets.take(r) ) ) addChild(w, 0, -500000); } - if (d->accessKeysActivated) emit repaintAccessKeys(); + if (d->accessKeysEnabled && d->accessKeysActivated) emit repaintAccessKeys(); if (d->emitCompletedAfterRepaint) { bool full = d->emitCompletedAfterRepaint == KHTMLViewPrivate::CSFull; d->emitCompletedAfterRepaint = KHTMLViewPrivate::CSNone;
I'm very pleased with the ability to switch off the access keys. However I would suggest that it should be possible to configure this from inside konqueror, as this feature otherwise is very hard to find. Maybe an option to disable the automatic access keys, also would be nice. My major problem with the access keys is that when I write in edit fields, I sometimes press CTRL (meaning to press BackSpace next), but then decides not to do it anyway. When I continue to write, I get transfered to another page, because I have activated the shortcuts. When edit field on the page is large enough to fill the screen, the access key popups cannot be seen either, which means that I don't get any warning that access keys have been activated, apart from the little notice in the status bar (which I don't see).
*** Bug 123468 has been marked as a duplicate of this bug. ***
In witch version of KDE will this patch be included?
It's already there for 3.5.1.
But you have to edit the file by hand?
I really like this feature. However, I also like to use the ctrl while entering text (e.g., ctrl+left, ctrl+right, etc.). This results in me constantly loosing my entries in textboxes because I've pressed ctrl in order to do a ctrl+left/right combo to move by a word and then changed my mind. The first letter in whatever text I type next then follows some link on me. It would thus be great if this was done as like the keyboard shortcut options where I can choose to have it assigned to whatever key combo I want (escape comes to mind) or disabled.