[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2004-07-28 10:20:27
Message-ID: 20040728102027.82DA398EA () office ! kde ! org
[Download RAW message or body]
CVS commit by lunakl:
Change the key for suspending Shift+arrows scrolling from Ctrl to Shift,
modelled after the accesskey handling, so that it doesn't conflict
with the accesskeys, and it makes more sense anyway.
M +11 -4 khtmlview.cpp 1.652
--- kdelibs/khtml/khtmlview.cpp #1.651:1.652
@@ -208,4 +208,5 @@ public:
scrollTimerId = 0;
scrollSuspended = false;
+ scrollSuspendPreActivate = false;
complete = false;
firstRelayout = true;
@@ -316,4 +317,5 @@ public:
int scrollTimerId;
bool scrollSuspended;
+ bool scrollSuspendPreActivate;
int scrollTiming;
int scrollBy;
@@ -1123,4 +1125,6 @@ void KHTMLView::keyPressEvent( QKeyEvent
if (_ke->key() == Key_Control && _ke->state()==0)
d->accessKeysPreActivate=true;
+ if (_ke->key() == Key_Shift && _ke->state()==0)
+ d->scrollSuspendPreActivate=true;
// accesskey handling needs to be done before dispatching, otherwise e.g. lineedits
@@ -1342,8 +1346,4 @@ void KHTMLView::keyPressEvent( QKeyEvent
_ke->ignore();
return;
- case Key_Control:
- if (d->scrollTimerId)
- d->scrollSuspended = !d->scrollSuspended;
- break;
default:
if (d->scrollTimerId)
@@ -1425,4 +1425,11 @@ void KHTMLView::keyReleaseEvent(QKeyEven
else if (d->accessKeysActivated) accessKeysTimeout();
+ if( d->scrollSuspendPreActivate && _ke->key() != Key_Shift )
+ d->scrollSuspendPreActivate = false;
+ if( _ke->key() == Key_Shift && d->scrollSuspendPreActivate && _ke->state() == Qt::ShiftButton
+ && !(KApplication::keyboardModifiers() & KApplication::ShiftModifier))
+ if (d->scrollTimerId)
+ d->scrollSuspended = !d->scrollSuspended;
+
// Send keyup event
if ( dispatchKeyEvent( _ke ) )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic