Added take screenshot plugin

This commit is contained in:
ipkpjersi 2023-12-27 21:30:53 -05:00
parent 75e6a68925
commit dc8462dd55

View file

@ -0,0 +1,24 @@
package TakeScreenshot
import plugin.Plugin
import plugin.annotations.PluginMeta
import plugin.api.API
import java.awt.event.KeyAdapter
import java.awt.event.KeyEvent
@PluginMeta (
author = "ipkpjersi",
description = "Allows you to use CRTL + PRINTSCREEN to take a screenshot.",
version = 1.0
)
class plugin : Plugin() {
override fun Init() {
API.AddKeyboardListener(object : KeyAdapter() {
override fun keyPressed(e: KeyEvent) {
if (e.keyCode == KeyEvent.VK_PRINTSCREEN && e.isControlDown) {
API.Screenshot()
}
}
})
}
}