QCAD Bugtracker

  • Status Closed
  • Percent Complete
    100%
  • Task Type Feature Request
  • Category QCAD (main)
  • Assigned To
    Andrew
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version 3 RC1
  • Due in Version 3.0.0
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by Andrew - 14.11.2011
Last edited by Andrew - 18.11.2011

FS#393 - Scrolling with arrow keys

Scrolling with arrow keys

Closed by  Andrew
18.11.2011 16:52
Reason for closing:  Implemented
Admin
Andrew commented on 18.11.2011 16:52

Implementation:

File scripts/Navigation/DefaultNavigation/DefaultNavigation.js

Add method:

DefaultNavigation.prototype.keyPressEvent = function(event) {
    var v = undefined;
 
    if (event.key()===Qt.Key_Left.valueOf()) {
        v = new RVector(50, 0);
    } else if (event.key()===Qt.Key_Right.valueOf()) {
        v = new RVector(-50, 0);
    } else if (event.key()===Qt.Key_Up.valueOf()) {
        v = new RVector(0, 50);
    } else if (event.key()===Qt.Key_Down.valueOf()) {
        v = new RVector(0, -50);
    }
 
    if (!isNull(v)) {
        this.view.pan(v);
        event.accept();
    }
};

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing