Changeset View
Changeset View
Standalone View
Standalone View
input.cpp
Show First 20 Lines • Show All 410 Lines • ▼ Show 20 Line(s) | 402 | bool wheelEvent(QWheelEvent *event) override { | |||
---|---|---|---|---|---|
411 | } else if (event->angleDelta().y() < 0) { | 411 | } else if (event->angleDelta().y() < 0) { | ||
412 | direction = PointerAxisDown; | 412 | direction = PointerAxisDown; | ||
413 | } else if (event->angleDelta().y() > 0) { | 413 | } else if (event->angleDelta().y() > 0) { | ||
414 | direction = PointerAxisUp; | 414 | direction = PointerAxisUp; | ||
415 | } | 415 | } | ||
416 | return input()->shortcuts()->processAxis(event->modifiers(), direction); | 416 | return input()->shortcuts()->processAxis(event->modifiers(), direction); | ||
417 | } | 417 | } | ||
418 | bool keyEvent(QKeyEvent *event) override { | 418 | bool keyEvent(QKeyEvent *event) override { | ||
419 | if (event->type() == QEvent::KeyPress && !event->isAutoRepeat()) { | 419 | if (event->type() == QEvent::KeyPress) { | ||
420 | return input()->shortcuts()->processKey(event->modifiers(), event->nativeVirtualKey()); | 420 | return input()->shortcuts()->processKey(event->modifiers(), event->nativeVirtualKey()); | ||
421 | } | 421 | } | ||
422 | return false; | 422 | return false; | ||
423 | } | 423 | } | ||
424 | }; | 424 | }; | ||
425 | 425 | | |||
426 | class InternalWindowEventFilter : public InputEventFilter { | 426 | class InternalWindowEventFilter : public InputEventFilter { | ||
427 | bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override { | 427 | bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override { | ||
▲ Show 20 Lines • Show All 1152 Lines • Show Last 20 Lines |