From 6a9139f9e9fe5cd7d9f16ea996004365b8467e6a Mon Sep 17 00:00:00 2001 From: Bui Date: Fri, 25 Feb 2022 18:50:21 +0000 Subject: [PATCH] fix ctrl+f --- public/src/js/songselect.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index 1648ee6..947aedc 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -335,7 +335,8 @@ class SongSelect{ session: ["backspace"], ctrl: ["ctrl"], shift: ["shift"], - mute: ["q"] + mute: ["q"], + search: ["f"] }, this.keyPress.bind(this)) this.gamepad = new Gamepad({ confirm: ["b", "start", "ls", "rs"], @@ -410,6 +411,7 @@ class SongSelect{ }else if (this.search){ if(name === "back" || (event && event.keyCode && event.keyCode === 70 && ctrl)) { this.removeSearch(true) + event.preventDefault() }else if(name === "down" && this.search.results.length){ if(this.search.input == document.activeElement && this.search.results){ this.searchSetActive(0) @@ -440,6 +442,7 @@ class SongSelect{ }else if(this.state.screen === "song"){ if(event && event.keyCode && event.keyCode === 70 && ctrl){ this.displaySearch() + event.preventDefault() }else if(name === "confirm"){ this.toSelectDifficulty() }else if(name === "back"){