| Author | DaveJarvis <email> |
|---|---|
| Date | 2022-11-04 00:16:22 GMT-0700 |
| Commit | 8dcf9a3dbbe57abd39fea64ab0a75e8bc7bf724f |
| Parent | 97d4285 |
| ``` | ||
| - | ||
| - | ||
| # Download | ||
| group 'com.whitemagicsoftware' | ||
| -version '1.0' | ||
| +version '1.1' | ||
| repositories { | ||
| mavenCentral() | ||
| } | ||
| dependencies { | ||
| // Command-line parsing | ||
| - implementation 'info.picocli:picocli:4.6.1' | ||
| + implementation 'info.picocli:picocli:4.7.0' | ||
| // SVG | ||
| implementation fileTree(include: ['**/*.jar'], dir: 'libs') | ||
| - implementation 'com.1stleg:jnativehook:2.1.0' | ||
| + implementation 'com.github.kwhat:jnativehook:2.2.2' | ||
| } | ||
| compileJava { | ||
| + sourceCompatibility = '14' | ||
| + targetCompatibility = '14' | ||
| + | ||
| options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" | ||
| } | ||
| import java.util.NoSuchElementException; | ||
| -import static org.jnativehook.NativeInputEvent.*; | ||
| +import static com.github.kwhat.jnativehook.NativeInputEvent.*; | ||
| /** |
| package com.whitemagicsoftware.kmcaster; | ||
| +import com.github.kwhat.jnativehook.GlobalScreen; | ||
| +import com.github.kwhat.jnativehook.NativeHookException; | ||
| import com.whitemagicsoftware.kmcaster.listeners.FrameDragListener; | ||
| import com.whitemagicsoftware.kmcaster.listeners.KeyboardListener; | ||
| import com.whitemagicsoftware.kmcaster.listeners.MouseListener; | ||
| import com.whitemagicsoftware.kmcaster.ui.TranslucentPanel; | ||
| -import org.jnativehook.GlobalScreen; | ||
| -import org.jnativehook.NativeHookException; | ||
| import picocli.CommandLine; | ||
| import picocli.CommandLine.Help.Ansi.Style; | ||
| import javax.swing.*; | ||
| import java.beans.PropertyChangeListener; | ||
| import java.io.IOException; | ||
| import java.net.URISyntaxException; | ||
| +import static com.github.kwhat.jnativehook.GlobalScreen.*; | ||
| import static com.whitemagicsoftware.kmcaster.ui.Constants.TRANSLUCENT; | ||
| import static com.whitemagicsoftware.kmcaster.ui.FontLoader.initFonts; | ||
| import static java.util.logging.Level.OFF; | ||
| import static java.util.logging.Logger.getLogger; | ||
| import static javax.swing.SwingUtilities.invokeLater; | ||
| -import static org.jnativehook.GlobalScreen.*; | ||
| import static picocli.CommandLine.Help.ColorScheme; | ||
| /** | ||
| * This class is responsible for casting key presses and mouse clicks on the | ||
| * screen. While there is a plethora of software out here that does this, | ||
| * none meet all the following criteria: small size, easily positioned, | ||
| - * show single key stroke or chord, shows left/right mouse clicks, shows | ||
| + * show single keystroke or chord, shows left/right mouse clicks, shows | ||
| * release of modifier keys when quickly typing, and traps all keys typed | ||
| * from within Sikuli. |
| package com.whitemagicsoftware.kmcaster.listeners; | ||
| +import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent; | ||
| +import com.github.kwhat.jnativehook.keyboard.NativeKeyListener; | ||
| import com.whitemagicsoftware.kmcaster.HardwareSwitch; | ||
| -import org.jnativehook.keyboard.NativeKeyEvent; | ||
| -import org.jnativehook.keyboard.NativeKeyListener; | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
| +import static com.github.kwhat.jnativehook.keyboard.NativeKeyEvent.getKeyText; | ||
| import static com.whitemagicsoftware.kmcaster.HardwareSwitch.*; | ||
| import static java.util.Map.entry; | ||
| -import static org.jnativehook.keyboard.NativeKeyEvent.getKeyText; | ||
| /** |
| package com.whitemagicsoftware.kmcaster.listeners; | ||
| +import com.github.kwhat.jnativehook.mouse.NativeMouseEvent; | ||
| +import com.github.kwhat.jnativehook.mouse.NativeMouseInputListener; | ||
| +import com.github.kwhat.jnativehook.mouse.NativeMouseWheelEvent; | ||
| +import com.github.kwhat.jnativehook.mouse.NativeMouseWheelListener; | ||
| import com.whitemagicsoftware.kmcaster.HardwareSwitch; | ||
| import com.whitemagicsoftware.kmcaster.util.Pair; | ||
| -import org.jnativehook.mouse.NativeMouseEvent; | ||
| -import org.jnativehook.mouse.NativeMouseInputListener; | ||
| -import org.jnativehook.mouse.NativeMouseWheelEvent; | ||
| -import org.jnativehook.mouse.NativeMouseWheelListener; | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
| +import static com.github.kwhat.jnativehook.mouse.NativeMouseWheelEvent.WHEEL_HORIZONTAL_DIRECTION; | ||
| +import static com.github.kwhat.jnativehook.mouse.NativeMouseWheelEvent.WHEEL_VERTICAL_DIRECTION; | ||
| import static com.whitemagicsoftware.kmcaster.HardwareSwitch.*; | ||
| import static java.util.Map.entry; | ||
| -import static org.jnativehook.mouse.NativeMouseWheelEvent.WHEEL_HORIZONTAL_DIRECTION; | ||
| -import static org.jnativehook.mouse.NativeMouseWheelEvent.WHEEL_VERTICAL_DIRECTION; | ||
| /** |
| Delta | 20 lines added, 19 lines removed, 1-line increase |
|---|