Skip to content

Commit f92d18a

Browse files
committed
Added alternative keybindings for zoom-in/zoom-out
1 parent e3569d5 commit f92d18a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This project is based on **qhexedit2**, **capstone** and **keystone** engines. N
3232
* Pattern Matching Engine (see later for details)
3333
* Disassebler based on Capstone Engine [`F4`]
3434
* Assembler based on Keystone Engine [`F4`]
35-
* Zoom-Out/Zoom-In bytes view (`CTRL + -/+`)
35+
* Zoom-Out/Zoom-In bytes view (`CTRL + Up/Down` or `CTRL + -/+`)
3636
* Shortcuts for all these features
3737

3838
## Pattern Matching Engine

src/fhex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,12 @@ void Fhex::keyPressEvent(QKeyEvent *event) {
536536
} else if ((event->key() == Qt::Key_Left) && QApplication::keyboardModifiers().testFlag(Qt::AltModifier)) {
537537
//Go to the previous chunk
538538
this->loadFile(this->hexEditor->getCurrentPath().c_str(), this->startOffset-this->lengthOffset, this->lengthOffset, true);
539-
} else if ((event->key() == Qt::Key_Minus) && QApplication::keyboardModifiers().testFlag(Qt::ControlModifier)) {
539+
} else if (((event->key() == Qt::Key_Minus) || (event->key() == Qt::Key_Down)) && QApplication::keyboardModifiers().testFlag(Qt::ControlModifier)) {
540540
if (this->fontSize > 2)
541541
this->fontSize -= 1;
542542
this->qhex->setFont(QFont("Monospace", this->fontSize));
543543
this->updateUI();
544-
} else if ((event->key() == Qt::Key_Plus) && QApplication::keyboardModifiers().testFlag(Qt::ControlModifier)) {
544+
} else if (((event->key() == Qt::Key_Plus) || (event->key() == Qt::Key_Up)) && QApplication::keyboardModifiers().testFlag(Qt::ControlModifier)) {
545545
if (this->fontSize < 40)
546546
this->fontSize += 1;
547547
this->qhex->setFont(QFont("Monospace", this->fontSize));

0 commit comments

Comments
 (0)