Resolve issue with non-functional F3 key (#365)

This commit is contained in:
Maksim Grigorev 2025-06-03 13:14:34 +03:00 committed by GitHub
commit 7635375471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 10 deletions

View file

@ -30,7 +30,6 @@ import { switchGameMode } from './packetsReplay/replayPackets'
import { tabListState } from './react/PlayerListOverlayProvider'
import { type ActionType, type ActionHoldConfig, type CustomAction } from './appConfig'
export const customKeymaps = proxy(appStorage.keybindings)
subscribe(customKeymaps, () => {
appStorage.keybindings = customKeymaps

View file

@ -55,13 +55,6 @@ export default () => {
const viewDegToMinecraft = (yaw) => yaw % 360 - 180 * (yaw < 0 ? -1 : 1)
const handleF3 = (e) => {
if (e.code === 'F3') {
miscUiState.showDebugHud = !miscUiState.showDebugHud
e.preventDefault()
}
}
const readPacket = (data, { name }, _buf, fullBuffer) => {
if (fullBuffer) {
const size = fullBuffer.byteLength
@ -107,7 +100,6 @@ export default () => {
}
}
document.addEventListener('keydown', handleF3)
let update = 0
const packetsUpdateInterval = setInterval(() => {
setPacketsString(`${received.current.count} (${(received.current.size / 1024).toFixed(2)} KB/s, ${getFixedFilesize(receivedTotal.current)}) ↑ ${sent.current.count}`)
@ -163,7 +155,6 @@ export default () => {
})
return () => {
document.removeEventListener('keydown', handleF3)
clearInterval(packetsUpdateInterval)
clearInterval(freqUpdateInterval)
clearInterval(notFrequentUpdateInterval)