mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Bind up/down to prev/next event; closes #1167
This commit is contained in:
@@ -59,6 +59,18 @@ class TopBar extends React.Component {
|
||||
return this.handleSearchClearButton(e)
|
||||
}
|
||||
|
||||
// Next note on DOWN key
|
||||
if (e.keyCode === 40) {
|
||||
ee.emit('list:next')
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
// Prev note on UP key
|
||||
if (e.keyCode === 38) {
|
||||
ee.emit('list:prior')
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
// When the key is an alphabet, del, enter or ctr
|
||||
if (e.keyCode <= 90 || e.keyCode >= 186 && e.keyCode <= 222) {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user