Hotkeys After Startup

This fixes the bug with needing to click and wait for hotkeys to start working
This commit is contained in:
Konloch 2021-07-06 22:57:35 -07:00
parent 6af691edf9
commit 963e31408a
2 changed files with 5 additions and 1 deletions

View File

@ -258,6 +258,10 @@ public class BytecodeViewer
//print startup time
System.out.println("Start up took " + ((System.currentTimeMillis() - Configuration.start) / 1000) + " seconds");
//request focus on GUI for hotkeys on start
if(!cli)
viewer.requestFocus();
//open files from launch args
if (!cli)
if (launchArgs.length >= 1)

View File

@ -38,7 +38,7 @@ public class Configuration
public static boolean verifyCorruptedStateOnBoot = false; //eventually may be a setting
public static long lastHotKeyExecuted = System.currentTimeMillis();
public static long lastHotKeyExecuted = 0;
public static Language language = Language.ENGLISH;