Skip to content

Commit

Permalink
fix: enable type/delete the passcode with physical keyboard and back …
Browse files Browse the repository at this point in the history
…enable too
  • Loading branch information
Aitorbp committed Aug 26, 2024
1 parent 9983794 commit e3898c2
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,23 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
true
}

in KeyEvent.KEYCODE_0..KeyEvent.KEYCODE_9 -> {
val number = keyCode - KeyEvent.KEYCODE_0
passCodeViewModel.onNumberClicked(number)
true
}

KeyEvent.KEYCODE_DEL -> {
passCodeViewModel.onBackspaceClicked()
true
}

KeyEvent.KEYCODE_ESCAPE -> {
PassCodeManager.onActivityStopped(this)
super.onBackPressed()
true
}

else -> super.onKeyUp(keyCode, event)
}
}
Expand Down

0 comments on commit e3898c2

Please sign in to comment.