mirror of
https://gitlab.com/2009scape/tools/rs09-thanos-tool.git
synced 2026-08-01 14:39:20 -06:00
22 lines
No EOL
505 B
Kotlin
22 lines
No EOL
505 B
Kotlin
package misc
|
|
|
|
import java.awt.AWTEvent
|
|
import java.awt.Event
|
|
import java.awt.EventQueue
|
|
import java.awt.Toolkit
|
|
import java.awt.event.KeyEvent
|
|
|
|
class CustomEventQueue : EventQueue() {
|
|
override fun dispatchEvent(event: AWTEvent?) {
|
|
if(event is KeyEvent){
|
|
GlobalKeybinds.handle(event)
|
|
}
|
|
super.dispatchEvent(event)
|
|
}
|
|
|
|
companion object {
|
|
fun install() {
|
|
Toolkit.getDefaultToolkit().systemEventQueue.push(CustomEventQueue())
|
|
}
|
|
}
|
|
} |