diff --git a/build.gradle.kts b/build.gradle.kts index 4947b1b..5551a5a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -40,6 +40,7 @@ dependencies { // Logging implementation("org.apache.logging.log4j:log4j-api:2.24.3") implementation("org.apache.logging.log4j:log4j-core:2.24.3") + implementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.24.3") } compose.desktop { @@ -48,6 +49,8 @@ compose.desktop { // Allow access to AWT Classes to control the window jvmArgs("--add-opens", "java.desktop/com.apple.eawt=ALL-UNNAMED") + // Skiko / JNativeHook load native libraries via System.load() — JDK 22+ requires explicit native access + jvmArgs("--enable-native-access=ALL-UNNAMED") nativeDistributions { targetFormats(TargetFormat.Dmg) diff --git a/src/main/kotlin/ch/ergon/anytask/Main.kt b/src/main/kotlin/ch/ergon/anytask/Main.kt index e7bd0af..d15906f 100644 --- a/src/main/kotlin/ch/ergon/anytask/Main.kt +++ b/src/main/kotlin/ch/ergon/anytask/Main.kt @@ -65,6 +65,7 @@ fun main() { onSettings = { isSettingsVisible = true }, onExit = { exitApplication() }, ) + logger.info("AnyTask started. Press ${HotkeyManager.DESCRIPTION} to open the task window.") } DisposableEffect(Unit) { diff --git a/src/main/kotlin/ch/ergon/anytask/hotkey/HotkeyManager.kt b/src/main/kotlin/ch/ergon/anytask/hotkey/HotkeyManager.kt index 0643d7f..9e5283c 100644 --- a/src/main/kotlin/ch/ergon/anytask/hotkey/HotkeyManager.kt +++ b/src/main/kotlin/ch/ergon/anytask/hotkey/HotkeyManager.kt @@ -15,6 +15,9 @@ import java.util.logging.Logger */ object HotkeyManager { + /** Human-readable description of the hotkey combination handled by [isHotkey]. */ + const val DESCRIPTION: String = "Ctrl+Shift+Space" + private val logger = LogManager.getLogger(HotkeyManager::class.java) private var listener: NativeKeyListener? = null