so when i run this code
const $KeyMappingRegistry = Java.loadClass('dev.architectury.registry.client.keymappings.KeyMappingRegistry')
const $KeyMapping = Java.loadClass('net.minecraft.client.KeyMapping')
const $GLFWKey = Java.loadClass('org.lwjgl.glfw.GLFW')
ClientEvents.init(event => {
global.HKEY = new $KeyMapping('key.kubejs.hkey', $GLFWKey.GLFW_KEY_H, 'key.categories.kubejs')
$KeyMappingRegistry.register(global.HKEY)
})
ClientEvents.tick(event => {
if (Client.currentScreen == null) {
if (global.HKEY.consumeClick()) {
console.log('Key pressed')
}
}
})
i get this error
keybind_use.js#3: Error in 'ClientEvents.tick': TypeError: Cannot call method "consumeClick" of undefined