Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/kmcaster.git
.idea/gradle.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
+ <component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
.idea/workspace.xml
<component name="ChangeListManager">
<list default="true" id="be1819c5-28d3-4984-9634-0b266734e13c" name="Default Changelist" comment="">
- <change afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/EventFrame.java" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/FrameDragListener.java" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/KeyboardListener.java" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/MouseListener.java" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/AppImage.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/gradle.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/key/dn/alphanum.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/key/dn/short.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/key/dn/modifier.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/key/dn/medium.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/key/dn/shift.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/key/dn/long.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/key/up/alphanum.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/key/up/short.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/key/up/modifier.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/key/up/medium.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/key/up/shift.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/key/up/long.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/mouse/all.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/mouse/all.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/mouse/chord.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/mouse/2.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/mouse/left.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/mouse/1.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/mouse/rest.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/mouse/0.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/mouse/right.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/images/mouse/3.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/EventFrame.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/EventFrame.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/KmCaster.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/KmCaster.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/KeyboardListener.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/KeyboardListener.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/MouseListener.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/com/whitemagicsoftware/kmcaster/listeners/MouseListener.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<list>
<option value="Class" />
+ <option value="Enum" />
</list>
</option>
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
- <property name="settings.editor.selected.configurable" value="reference.settingsdialog.project.gradle" />
+ <property name="project.structure.last.edited" value="Modules" />
+ <property name="project.structure.proportion" value="0.15" />
+ <property name="project.structure.side.proportion" value="0.21724138" />
+ <property name="settings.editor.selected.configurable" value="File.Encoding" />
<property name="show.unlinked.gradle.project.popup" value="true" />
</component>
<component name="RecentsManager">
<key name="MoveInnerDialog.RECENTS_KEY">
<recent name="com.whitemagicsoftware.kmcaster" />
<recent name="com.whitemagicsoftware.kmcaster.listeners" />
</key>
<key name="CreateClassDialog.RecentsKey">
+ <recent name="com.whitemagicsoftware.kmcaster" />
<recent name="com.whitemagicsoftware.kmcaster.listeners" />
</key>
</state>
<state x="813" y="683" width="218" height="250" key="#Notifications/0.28.2560.1529@0.28.2560.1529" timestamp="1594856235998" />
+ <state x="734" y="519" width="376" height="578" key="#com.intellij.ide.util.MemberChooser" timestamp="1594881096559">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state x="734" y="519" width="376" height="578" key="#com.intellij.ide.util.MemberChooser/0.28.2560.1529@0.28.2560.1529" timestamp="1594881096559" />
<state x="745" y="737" key="#com.intellij.refactoring.move.MoveHandler.SelectRefactoringDialog" timestamp="1594860488340">
<screen x="0" y="28" width="2560" height="1529" />
</state>
<state x="567" y="28" width="711" height="1526" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594858565314" />
- <state x="710" y="704" width="425" height="207" key="DetectedRootsChooserDialog" timestamp="1594859006476">
+ <state x="659" y="559" width="526" height="497" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1594880960290">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state x="710" y="704" width="425" height="207" key="DetectedRootsChooserDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594859006476" />
- <state width="1479" height="330" key="GridCell.Tab.0.bottom" timestamp="1594865163234">
+ <state x="659" y="559" width="526" height="497" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594880960290" />
+ <state x="710" y="704" width="425" height="207" key="DetectedRootsChooserDialog" timestamp="1594872764235">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state width="1479" height="330" key="GridCell.Tab.0.bottom/0.28.2560.1529@0.28.2560.1529" timestamp="1594865163234" />
- <state width="1479" height="330" key="GridCell.Tab.0.center" timestamp="1594865163233">
+ <state x="710" y="704" width="425" height="207" key="DetectedRootsChooserDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594872764235" />
+ <state width="1479" height="406" key="GridCell.Tab.0.bottom" timestamp="1594881867827">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state width="1479" height="330" key="GridCell.Tab.0.center/0.28.2560.1529@0.28.2560.1529" timestamp="1594865163233" />
- <state width="1479" height="330" key="GridCell.Tab.0.left" timestamp="1594865163233">
+ <state width="1479" height="406" key="GridCell.Tab.0.bottom/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867827" />
+ <state width="1479" height="406" key="GridCell.Tab.0.center" timestamp="1594881867826">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state width="1479" height="330" key="GridCell.Tab.0.left/0.28.2560.1529@0.28.2560.1529" timestamp="1594865163233" />
- <state width="1479" height="330" key="GridCell.Tab.0.right" timestamp="1594865163233">
+ <state width="1479" height="406" key="GridCell.Tab.0.center/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867826" />
+ <state width="1479" height="406" key="GridCell.Tab.0.left" timestamp="1594881867826">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state width="1479" height="330" key="GridCell.Tab.0.right/0.28.2560.1529@0.28.2560.1529" timestamp="1594865163233" />
- <state x="423" y="444" key="SettingsEditor" timestamp="1594855824250">
+ <state width="1479" height="406" key="GridCell.Tab.0.left/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867826" />
+ <state width="1479" height="406" key="GridCell.Tab.0.right" timestamp="1594881867827">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state x="423" y="444" key="SettingsEditor/0.28.2560.1529@0.28.2560.1529" timestamp="1594855824250" />
- <state x="589" y="477" width="672" height="678" key="search.everywhere.popup" timestamp="1594858571847">
+ <state width="1479" height="406" key="GridCell.Tab.0.right/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867827" />
+ <state width="1479" height="406" key="GridCell.Tab.1.bottom" timestamp="1594881867827">
<screen x="0" y="28" width="2560" height="1529" />
</state>
- <state x="589" y="477" width="672" height="678" key="search.everywhere.popup/0.28.2560.1529@0.28.2560.1529" timestamp="1594858571847" />
+ <state width="1479" height="406" key="GridCell.Tab.1.bottom/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867827" />
+ <state width="1479" height="406" key="GridCell.Tab.1.center" timestamp="1594881867827">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state width="1479" height="406" key="GridCell.Tab.1.center/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867827" />
+ <state width="1479" height="406" key="GridCell.Tab.1.left" timestamp="1594881867827">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state width="1479" height="406" key="GridCell.Tab.1.left/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867827" />
+ <state width="1479" height="406" key="GridCell.Tab.1.right" timestamp="1594881867827">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state width="1479" height="406" key="GridCell.Tab.1.right/0.28.2560.1529@0.28.2560.1529" timestamp="1594881867827" />
+ <state x="423" y="444" width="1026" height="842" key="SettingsEditor" timestamp="1594876039235">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state x="423" y="444" width="1026" height="842" key="SettingsEditor/0.28.2560.1529@0.28.2560.1529" timestamp="1594876039235" />
+ <state x="265" y="308" width="1323" height="1003" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1594881438574">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state x="265" y="308" width="1323" height="1003" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594881438573" />
+ <state x="589" y="382" key="run.anything.popup" timestamp="1594881668952">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state x="589" y="382" key="run.anything.popup/0.28.2560.1529@0.28.2560.1529" timestamp="1594881668952" />
+ <state x="589" y="477" width="672" height="678" key="search.everywhere.popup" timestamp="1594880500645">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state x="589" y="477" width="672" height="678" key="search.everywhere.popup/0.28.2560.1529@0.28.2560.1529" timestamp="1594880500645" />
+ </component>
+ <component name="XDebuggerManager">
+ <watches-manager>
+ <configuration name="Remote">
+ <watch expression="mClassLoader.getResource(&quot;/images/key/dn/shift.svg&quot;)" language="JAVA" />
+ </configuration>
+ </watches-manager>
</component>
</project>
build.gradle
application {
applicationName = 'kmcaster'
- mainClassName = "com.whitemagicsoftware.${applicationName}.KmCast"
+ mainClassName = "com.whitemagicsoftware.${applicationName}.KmCaster"
}
images/key/dn/alphanum.svg
-<svg height="11.615047mm" viewBox="0 0 12.362682 11.615047" width="12.362682mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(-.16684802 0 0 .16684802 457.8413 214.08468)" gradientUnits="userSpaceOnUse" x1="338.63031" x2="358.67578" y1="522.47595" y2="538.1333"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="360.03877876328" x2="363.86003389461" y1="300.90122247002" y2="303.51362031597"><stop offset="0" stop-color="#656565"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="398.36286129201" x2="397.8572450522" y1="267.73274772245" y2="265.62598113264"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="d" gradientTransform="matrix(.19208083 0 0 .50174705 278.16509 190.95032)" gradientUnits="userSpaceOnUse" x1="506.54913" x2="586.02765" y1="186.9615" y2="186.9615"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><linearGradient id="e" gradientTransform="matrix(.19208083 0 0 .50174705 278.16509 190.95032)" gradientUnits="userSpaceOnUse" x1="447.03323" x2="516.2417" y1="177.95511" y2="177.95511"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.26458333 0 0 .26458333 -94.66906 -69.95494)"><path d="m360.1253 264.39661h37.14661c1.28583 0 2.32099 1.03516 2.32099 2.32099v29.65406h-41.75697l-.0316-29.65406c-.001-1.28583 1.03516-2.32099 2.32099-2.32099z" fill="#656565"/><path d="m360.73083 302.54279h36.954876v5.733785h-36.954876z" fill="#929292"/><path d="m393.20774 267.61445h11.32169v28.78137h-11.32169z" fill="#d6d6d6"/><path d="m395.86 295.44468 8.66943.95114v8.40293c-.005 2.17337-1.73219 3.42204-3.51833 3.49725l-3.85072-.0194-4.24981-9.92456z" fill="url(#a)"/><path d="m363.81917 295.3604-5.98324 1.01126-.0316 8.42709c.004 2.17337 1.73217 3.42204 3.51832 3.49725l3.84486-.0421 1.34834-9.8597z" fill="url(#b)"/><path d="m397.25962 269.99799 7.26981-2.38354c-.28879-2.2916-1.8612-3.11162-4.05203-3.15819-.56277-.012-1.0254-.0443-1.62233-.0544-.59693-.0102-1.95889-.001-1.95889-.001-1.37344.26896-2.44856 1.05576-3.20013 2.34598z" fill="url(#c)"/><rect fill="url(#d)" height="35.645615" ry="2.704166" stroke="url(#e)" stroke-width=".498687" width="34.355576" x="363.95416" y="266.93491"/></g></svg>
+
images/key/dn/modifier.svg
-<svg height="11.615047mm" viewBox="0 0 19.917702 11.615047" width="19.917702mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(11.131698 0 0 4.4214115 197.45916 184.07423)" gradientUnits="userSpaceOnUse" x1="2.4162" x2="7.1659" y1="8.0492" y2="2.2273"><stop offset="0" stop-color="#cfcfcf"/><stop offset="1" stop-color="#efefef"/></linearGradient><linearGradient id="b" gradientTransform="matrix(-.16684802 0 0 .16684802 326.18477 136.53605)" gradientUnits="userSpaceOnUse" x1="338.63031" x2="358.67578" y1="522.47595" y2="538.1333"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="199.82784876328" x2="203.64910389461" y1="223.35260247002" y2="225.96500031597"><stop offset="0" stop-color="#656565"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="266.70633129201" x2="266.2007150522" y1="190.18412772245" y2="188.07736113264"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="e" gradientTransform="matrix(.35392719 0 0 .49979229 45.738149 113.76716)" gradientUnits="userSpaceOnUse" x1="506.54913" x2="586.02765" y1="186.9615" y2="186.9615"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><linearGradient id="f" gradientTransform="matrix(.35392719 0 0 .49979229 45.738149 113.76716)" gradientUnits="userSpaceOnUse" x1="447.48715" x2="524.77094" y1="177.84055" y2="177.84055"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#c1c1c1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.26458333 0 0 .26458333 -52.279924 -49.43686)"><path d="m206.05653 189.49496h56.89524c1.48898 0 2.68762 1.1987 2.68762 2.68768v30.05289c0 1.48898-1.19869 2.68763-2.68762 2.68763h-56.89524c-1.48898 0-2.68762-1.1987-2.68762-2.68763v-30.05289c0-1.48898 1.19869-2.68768 2.68762-2.68768z" fill="url(#a)" stroke-width=".498687"/><path d="m199.91437 186.84799h65.37035c1.28583 0 2.32099 1.03516 2.32099 2.32099v29.65405h-69.98071l-.0316-29.65405c-.001-1.28583 1.03516-2.32099 2.32099-2.32099z" fill="#656565"/><path d="m265.56489 192.09811v30.07932c0 1.25774-.95085 2.6037-2.20859 2.6037h-57.52857v.55145h57.52857c1.72017 0 2.9051-1.43497 2.9051-3.15515v-30.08081h-.69646z" fill="#fff" stroke-width=".498687"/><path d="m202.58707 224.99417h63.057961v5.733785h-63.057961z" fill="#929292"/><path d="m261.5512 190.06583h11.3217v28.78137h-11.3217z" fill="#d6d6d6"/><path d="m264.20347 217.89605 8.66943.95115v8.40293c-.005 2.17337-1.73219 3.42204-3.51834 3.49725l-3.85071-.0194-4.24982-9.92456z" fill="url(#b)"/><path d="m203.60824 217.81178-5.98324 1.01125-.0316 8.4271c.004 2.17337 1.73217 3.42204 3.51832 3.49725l3.84486-.0421 1.34834-9.8597z" fill="url(#c)"/><path d="m265.60309 192.44937 7.26981-2.38354c-.28879-2.2916-1.8612-3.11162-4.05203-3.15819-.56277-.012-1.02541-.0443-1.62233-.0544-.59693-.0102-1.9589-.00099-1.9589-.00099-1.37343.26896-2.44855 1.05576-3.20012 2.34598z" fill="url(#d)"/><rect fill="url(#e)" height="35.506744" ry="2.693631" stroke="url(#f)" stroke-width=".498687" width="63.303421" x="203.81265" y="189.45572"/></g></svg>
+
images/key/dn/shift.svg
-<svg height="11.615047mm" viewBox="0 0 26.855953 11.615047" width="26.855953mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(-.16684802 0 0 .16684802 246.07931 136.53605)" gradientUnits="userSpaceOnUse" x1="338.63031" x2="358.67578" y1="522.47595" y2="538.1333"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="93.49905376328" x2="97.32030889461" y1="223.35260247002" y2="225.96500031597"><stop offset="0" stop-color="#656565"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="186.60084629201" x2="186.0952300522" y1="190.18412772245" y2="188.07736113264"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="127.40402795705" x2="167.03895650385" y1="207.20908563895" y2="207.20908563895"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><linearGradient id="e" gradientUnits="userSpaceOnUse" x1="97.57964500446" x2="128.18176570951" y1="202.34699417516" y2="202.34699417516"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#c1c1c1"/></linearGradient><g transform="matrix(.26458333 0 0 .26458333 -24.147087 -49.43686)"><g fill-rule="evenodd"><path d="m93.585576 186.84799h92.457444c1.28583 0 2.321 1.03516 2.321 2.32099v29.65405h-97.067817l-.03162-29.65405c-.0015-1.28583 1.03516-2.32099 2.32099-2.32099z" fill="#656565"/><path d="m98.172195 224.99417h87.226151v5.733785h-87.226151z" fill="#929292"/><path d="m181.4457 190.06583h11.32169l.00001 28.78137h-11.3217z" fill="#d6d6d6"/><path d="m184.098 217.89605 8.6694.95115-.00001 8.40293c-.004 2.17337-1.73216 3.42204-3.5183 3.49725l-3.85075-.0194-4.24981-9.92456z" fill="url(#a)"/><path d="m97.279443 217.81178-5.98324 1.01125-.03162 8.4271c.0045 2.17337 1.73217 3.42204 3.518314 3.49725l3.844864-.0421 1.348336-9.8597z" fill="url(#b)"/><path d="m185.49759 192.44937 7.2698-2.38354c-.28879-2.2916-1.86117-3.11162-4.05202-3.15819-.56274-.012-1.02538-.0443-1.62231-.0544-.59693-.0102-1.95891-.00099-1.95891-.00099-1.37344.26896-2.44854 1.05576-3.2001 2.34598z" fill="url(#c)"/><rect fill="url(#d)" height="35.428242" ry="2.687675" stroke="url(#e)" stroke-width=".498687" width="89.195213" x="97.523109" y="189.49496"/></g><path d="m103.35277 208.14687h6.80658v7.74311h8.50861v-7.7496h6.80708l-11.06138-9.44605z" fill="none" stroke="#333" stroke-width="2.14047"/></g></svg>
+
images/key/up/alphanum.svg
-<svg height="11.615015mm" viewBox="0 0 12.362655 11.615015" width="12.362656mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(.38517289 0 0 1.0061356 -19.83415 -104.25445)" gradientUnits="userSpaceOnUse" x1="533.71136" x2="533.71136" y1="154.2484" y2="219.35825"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#f1f1f1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.131944 0 0 .131944 -18.45416 -5.67686)"><g fill="#e5e5e5"><path d="m144.51777 43.024793h74.48877c2.57843 0 4.65421 2.07578 4.65421 4.65421v59.464217h-83.73378l-.0634-59.464217c-.003-2.57843 2.07577-4.65421 4.6542-4.65421z"/><path d="m145.73203 119.51796h74.104309v11.497757h-74.104309z"/><path d="m210.8568 49.477413h22.703v57.714267h-22.703z"/><path d="m216.1753 105.28438 17.3845 1.9073v16.8501c-.01 4.35818-3.4735 6.86209-7.0552 7.0129l-7.7217-.0389-8.522-19.90136z"/><path d="m151.92495 105.11539-11.99798 2.02783-.0634 16.89856c.009 4.35818 3.47346 6.86209 7.05515 7.0129l7.70997-.0845 2.70377-19.77131z"/><path d="m218.9819 54.257043 14.5779-4.77963c-.5791-4.59526-3.7322-6.23962-8.1254-6.33301-1.1285-.024-2.0562-.0888-3.2532-.10917-1.197-.0204-3.9281-.002-3.9281-.002-2.7541.53934-4.91 2.11709-6.4171 4.70431z"/></g><rect fill="#f8f8f8" height="71.478889" ry="5.422568" stroke="url(#a)" width="68.892021" x="152.19562" y="48.114742"/></g></svg>
+
images/key/up/modifier.svg
-<svg height="11.615121mm" viewBox="0 0 19.917834 11.61512" width="19.917833mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(22.322 0 0 8.8661 264.96 40.648232)" gradientUnits="userSpaceOnUse" x1="2.4162" x2="7.1659" y1="8.0492" y2="2.2273"><stop offset="0" stop-color="#cfcfcf"/><stop offset="1" stop-color="#efefef"/></linearGradient><linearGradient id="b" gradientTransform="matrix(.70971768 0 0 1.0022158 -39.280779 -100.33605)" gradientUnits="userSpaceOnUse" x1="533.71136" x2="533.71136" y1="154.2484" y2="219.35825"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#f1f1f1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.1319452 0 0 .1319452 -34.995713 -6.09723)"><path d="m282.2 51.518232h114.09c2.9858 0 5.3894 2.4037 5.3894 5.3895v60.263998c0 2.9858-2.4037 5.3894-5.3894 5.3894h-114.09c-2.9858 0-5.3894-2.4037-5.3894-5.3894v-60.263998c0-2.9858 2.4037-5.3895 5.3894-5.3895z" fill="url(#a)"/><path d="m270.06712 46.210342h131.08484c2.57843 0 4.65421 2.07578 4.65421 4.65421v59.464218h-140.32985l-.0634-59.464218c-.003-2.57843 2.07577-4.65421 4.6542-4.65421z" fill="#e5e5e5"/><path d="m401.53 56.738232v60.316998c0 2.5221-1.9067 5.2211-4.4288 5.2211h-115.36v1.1058h115.36c3.4494 0 5.8255-2.8775 5.8255-6.3269v-60.319998h-1.3966z" fill="#fff"/><g fill="#e5e5e5"><path d="m275.2428 122.70352h126.4479v11.497757h-126.4479z"/><path d="m393.4815 52.662962h22.703v57.714268h-22.703z"/><path d="m398.8 108.46993 17.3845 1.9073v16.8501c-.01 4.35818-3.4735 6.86209-7.0552 7.0129l-7.7217-.0389-8.522-19.90136z"/><path d="m277.29053 108.30094-11.99798 2.02783-.0634 16.89856c.009 4.35818 3.47346 6.86209 7.05515 7.0129l7.70997-.0845 2.70377-19.77131z"/><path d="m401.6066 57.442592 14.5779-4.77963c-.5791-4.59526-3.7322-6.23962-8.1254-6.33301-1.1285-.024-2.0562-.0888-3.2532-.10917-1.197-.0204-3.9281-.002-3.9281-.002-2.7541.53934-4.91 2.11709-6.4171 4.70431z"/></g><rect fill="#f8f8f8" height="71.200417" ry="5.401443" stroke="url(#b)" width="126.94011" x="277.70044" y="51.439529"/></g></svg>
+
images/key/up/shift.svg
-<svg height="11.615067mm" viewBox="0 0 26.856001 11.615066" width="26.856001mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="532.239029" x2="532.239029" y1="56.270133" y2="121.379983"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#f1f1f1"/></linearGradient><g transform="matrix(.13194458 0 0 .13194458 -57.080236 -6.35364)"><g fill-rule="evenodd"><path d="m437.26186 48.153839h185.40164c2.57843 0 4.65421 2.07578 4.65421 4.65421v59.464221h-194.64665l-.0634-59.464221c-.003-2.57843 2.07577-4.65421 4.6542-4.65421z" fill="#e5e5e5"/><path d="m446.45923 124.64703h174.91151v11.497757h-174.91151z" fill="#e5e5e5"/><path d="m613.44466 54.606459h22.70299l.00002 57.714271h-22.70301z" fill="#e5e5e5"/><path d="m618.76322 110.41343 17.38445 1.9073-.00002 16.8501c-.009 4.35818-3.47345 6.86209-7.05514 7.0129l-7.72176-.0389-8.52199-19.90136z" fill="#e5e5e5"/><path d="m444.66904 110.24444-11.99798 2.02783-.0634 16.89856c.009 4.35818 3.47346 6.86209 7.05515 7.0129l7.70997-.0845 2.70377-19.77131z" fill="#e5e5e5"/><path d="m621.56976 59.386089 14.57789-4.77963c-.5791-4.59526-3.73214-6.23962-8.12538-6.33301-1.12844-.024-2.05615-.0888-3.25316-.10917-1.19701-.0204-3.92813-.002-3.92813-.002-2.75412.53934-4.90998 2.11709-6.41705 4.70431z" fill="#e5e5e5"/><rect fill="#f8f8f8" height="71.042999" ry="5.3895" stroke="url(#a)" width="178.86" x="445.15765" y="53.461731"/></g><path d="m456.84767 90.863729h13.649v15.527001h17.062v-15.540001h13.65l-22.181-18.94184z" fill="none" stroke="#e5e5e5" stroke-width="4.2922"/></g></svg>
+
images/mouse/all.svg
-<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><path d="m-215.44627 184.21104c1.05121 0 1.75568.55287 2.26286 1.28767.50884.73718.73446 1.66763.80868 2.43464-1.07427.36049-1.94146.53162-3.07154.53069z" fill="#40ff00" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><path d="m-215.44807 184.20884c-.95261 0-1.73653.55323-2.24371 1.28803-.50884.73718-.75361 1.66727-.82783 2.43428 1.07427.36049 1.94146.53162 3.07154.53069z" fill="#0096ff" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g><rect fill="#ff1500" fill-opacity=".25" fill-rule="evenodd" height="2.700655" rx=".537201" ry=".551873" width="1.074401" x="-215.98364" y="185.04196"/></g></svg>
+
images/mouse/chord.svg
-<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g><rect fill="#ff1500" fill-opacity=".25" fill-rule="evenodd" height="2.700655" rx=".537201" ry=".551873" width="1.074401" x="-215.98364" y="185.04196"/></g></svg>
+
images/mouse/left.svg
-<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><path d="m-215.44807 184.20884c-.95261 0-1.73653.55323-2.24371 1.28803-.50884.73718-.75361 1.66727-.82783 2.43428 1.07427.36049 1.94146.53162 3.07154.53069z" fill="#0096ff" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g></g></svg>
+
images/mouse/rest.svg
-<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="675.16781095345" x2="726.91040621336" y1="193.5974546131" y2="193.5974546131"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="694.62630016049" x2="706.30293766591" y1="170.04024231137" y2="170.04024231137"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="matrix(.11019174 0 0 .11019174 -74.07199 -16.55124)"><path d="m728.71927 191.15556c0 25.31414-12.65005 45.83532-28.25465 45.83532s-28.25465-20.52118-28.25465-45.83532 12.87203-40.95154 28.47664-40.95154c15.6046 0 28.03266 15.6374 28.03266 40.95154z" fill="url(#a)"/><g stroke="#333"><path d="m700.46462 150.76421v38.00227" fill="none" stroke-linecap="round"/><path d="m727.85189 184.1953c-16.7914 6.29576-36.32862 6.68664-54.76049 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="25.528791" rx="5.216753" width="10.433506" x="695.24786" y="157.27585"/></g></g></svg>
+
images/mouse/right.svg
-<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><path d="m-215.44627 184.21104c1.05121 0 1.75568.55287 2.26286 1.28767.50884.73718.73446 1.66763.80868 2.43464-1.07427.36049-1.94146.53162-3.07154.53069z" fill="#40ff00" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g></g></svg>
+
src/main/com/whitemagicsoftware/kmcaster/AppImage.java
+package com.whitemagicsoftware.kmcaster;
+
+import com.kitfox.svg.SVGDiagram;
+import com.kitfox.svg.SVGUniverse;
+
+import java.net.URL;
+
+import static java.lang.String.format;
+
+/**
+ * Responsible for loading vector graphics representations of application
+ * images. The images provide an on-screen interface that indicate to the user
+ * what key or mouse events are being triggered.
+ */
+public class AppImage {
+ private final static String IMAGES = "/images";
+ private final static String IMAGES_KEY = IMAGES + "/key";
+ private final static String IMAGES_MOUSE = IMAGES + "/mouse";
+
+ public static final AppImage MOUSE_LEFT = mouseImage( "0" );
+ public static final AppImage MOUSE_RIGHT = mouseImage( "1" );
+ public static final AppImage MOUSE_CHORD = mouseImage( "2" );
+ public static final AppImage MOUSE_WHEEL = mouseImage( "3" );
+ public static final AppImage MOUSE_ALL = mouseImage( "all" );
+ public static final AppImage KEY_UP_SHIFT = keyUpImage( "long" );
+ public static final AppImage KEY_UP_ALT = keyUpImage( "medium" );
+ public static final AppImage KEY_UP_CTRL = keyUpImage( "medium" );
+ public static final AppImage KEY_UP_REGULAR = keyUpImage( "short" );
+ public static final AppImage KEY_DN_SHIFT = keyDnImage( "long" );
+ public static final AppImage KEY_DN_ALT = keyDnImage( "medium" );
+ public static final AppImage KEY_DN_CTRL = keyDnImage( "medium" );
+ public static final AppImage KEY_DN_REGULAR = keyDnImage( "short" );
+
+ private static AppImage mouseImage( final String prefix ) {
+ return createImage( format( "%s/%s", IMAGES_MOUSE, prefix ) );
+ }
+
+ private static AppImage keyImage( final String state, final String prefix ) {
+ return createImage( format( "%s/%s/%s", IMAGES_KEY, state, prefix ) );
+ }
+
+ private static AppImage keyUpImage( final String prefix ) {
+ return keyImage( "up", prefix );
+ }
+
+ private static AppImage keyDnImage( final String prefix ) {
+ return keyImage( "dn", prefix );
+ }
+
+ private static AppImage createImage( final String path ) {
+ return new AppImage( format( "%s.svg", path ) );
+ }
+
+ private final SVGUniverse mRenderer = new SVGUniverse();
+ private final String mPath;
+
+ /**
+ * Constructs an enumerated type that represents the different types of
+ * images shown when keyboard and mouse events are triggered.
+ *
+ * @param path File name, including directory, to load.
+ */
+ private AppImage( final String path ) {
+ mPath = path;
+ }
+
+ public SVGDiagram getImage() {
+ final var url = getResourceUrl();
+ return mRenderer.getDiagram( mRenderer.loadSVG( url ) );
+ }
+
+ private URL getResourceUrl() {
+ return AppImage.class.getResource( getPath() );
+ }
+
+ private String getPath() {
+ return mPath;
+ }
+}
src/main/com/whitemagicsoftware/kmcaster/EventFrame.java
class EventFrame extends JFrame {
+
private static final float ARC = 8;
private static final int FRAME_WIDTH = 380;
src/main/com/whitemagicsoftware/kmcaster/KmCaster.java
import javax.swing.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.util.logging.Level;
*/
@SuppressWarnings("unused")
-public class KmCaster extends EventFrame {
+public class KmCaster extends EventFrame implements PropertyChangeListener {
public KmCaster() {
final MouseListener mouseEventListener = new MouseListener();
addNativeMouseListener( mouseEventListener );
addNativeMouseMotionListener( mouseEventListener );
addNativeMouseWheelListener( mouseEventListener );
final KeyboardListener keyboardListener = new KeyboardListener();
addNativeKeyListener( keyboardListener );
+ keyboardListener.addPropertyChangeListener( this );
}
-
- public static void main( final String[] args ) {
- initNativeHook();
- final var kc = new KmCaster();
- SwingUtilities.invokeLater( () -> kc.setVisible( true ) );
+ @Override
+ public void propertyChange( final PropertyChangeEvent evt ) {
+ System.out.println( evt );
}
+ /**
+ * Initialize the key and mouse event listener native interface.
+ */
private static void initNativeHook() {
try {
rethrow( ex );
}
+ }
+
+ /**
+ * Main entry point.
+ *
+ * @param args Unused.
+ */
+ public static void main( final String[] args ) {
+ initNativeHook();
+
+ final var kc = new KmCaster();
+ SwingUtilities.invokeLater( () -> kc.setVisible( true ) );
}
src/main/com/whitemagicsoftware/kmcaster/listeners/KeyboardListener.java
import org.jnativehook.keyboard.NativeKeyListener;
-import static org.jnativehook.NativeInputEvent.SHIFT_MASK;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.util.Map;
+import java.util.Set;
+
+import static java.util.Map.entry;
+import static org.jnativehook.NativeInputEvent.*;
import static org.jnativehook.keyboard.NativeKeyEvent.getKeyText;
public class KeyboardListener implements NativeKeyListener {
+ public final static String KEY_NAME_ALT = "ALT";
+ public final static String KEY_NAME_CTRL = "CTRL";
+ public final static String KEY_NAME_SHIFT = "SHIFT";
+ public final static String KEY_NAME_REGULAR = "REGULAR";
+
+ /**
+ * The library has default names for these modifiers, which will be
+ * converted to lower case for comparison with this set.
+ */
+ private final static Set<String> modifiers = Set.of(
+ "alt", "ctrl", "shift"
+ );
+
+ @SuppressWarnings("RedundantTypeArguments")
+ private final static Map<Integer, String> KEY_CODES =
+ Map.<Integer, String>ofEntries(
+ entry( 32, "␣" ),
+ entry( 33, "!" ),
+ entry( 34, "'" ),
+ entry( 35, "#" ),
+ entry( 36, "$" ),
+ entry( 37, "%" ),
+ entry( 38, "&" ),
+ entry( 39, "\"" ),
+ entry( 40, "(" ),
+ entry( 41, ")" ),
+ entry( 42, "*" ),
+ entry( 43, "+" ),
+ entry( 44, "," ),
+ entry( 45, "-" ),
+ entry( 46, "." ),
+ entry( 47, "/" ),
+ entry( 58, ":" ),
+ entry( 59, ";" ),
+ entry( 60, "<" ),
+ entry( 61, "=" ),
+ entry( 62, ">" ),
+ entry( 63, "?" ),
+ entry( 64, "@" ),
+ entry( 91, "[" ),
+ entry( 92, "\\" ),
+ entry( 93, "]" ),
+ entry( 94, "^" ),
+ entry( 95, "_" ),
+ entry( 96, "`" ),
+ entry( 97, "a" ),
+ entry( 98, "b" ),
+ entry( 99, "c" ),
+ entry( 100, "d" ),
+ entry( 101, "e" ),
+ entry( 102, "f" ),
+ entry( 103, "g" ),
+ entry( 104, "h" ),
+ entry( 105, "i" ),
+ entry( 106, "j" ),
+ entry( 107, "k" ),
+ entry( 108, "l" ),
+ entry( 109, "m" ),
+ entry( 110, "n" ),
+ entry( 111, "o" ),
+ entry( 112, "p" ),
+ entry( 113, "q" ),
+ entry( 114, "r" ),
+ entry( 115, "s" ),
+ entry( 116, "t" ),
+ entry( 117, "u" ),
+ entry( 118, "v" ),
+ entry( 119, "w" ),
+ entry( 120, "x" ),
+ entry( 121, "y" ),
+ entry( 122, "z" ),
+ entry( 123, "{" ),
+ entry( 124, "|" ),
+ entry( 125, "}" ),
+ entry( 126, "~" ),
+ entry( 65288, "Back ⌫" ),
+ entry( 65056, "Tab ↹" ),
+ entry( 65289, "Tab ↹" ),
+ entry( 65293, "Enter ⏎" ),
+ entry( 65361, "←" ),
+ entry( 65362, "↑" ),
+ entry( 65363, "→" ),
+ entry( 65364, "↓" ),
+ entry( 65307, "Esc" ),
+ entry( 65365, "PgUp" ),
+ entry( 65366, "PgDn" ),
+ entry( 65379, "Ins" ),
+ entry( 65535, "Del" ),
+ entry( 65506, "Shift" ),
+ entry( 65407, "Num" ),
+ entry( 65456, "Num 0" ),
+ entry( 65436, "Num 1" ),
+ entry( 65433, "Num 2" ),
+ entry( 65435, "Num 3" ),
+ entry( 65430, "Num 4" ),
+ entry( 65437, "Num 5" ),
+ entry( 65432, "Num 6" ),
+ entry( 65429, "Num 7" ),
+ entry( 65431, "Num 8" ),
+ entry( 65434, "Num 9" ),
+ entry( 65421, "Num ⏎" ),
+ entry( 65438, "Num Ins" ),
+ entry( 65439, "Num Del" ),
+ entry( 65451, "Num +" ),
+ entry( 65453, "Num -" ),
+ entry( 65454, "Num ." ),
+ entry( 65455, "Num /" ),
+ entry( 65450, "Num *" ),
+ entry( 65300, "Scrl" ),
+ entry( 65509, "Caps" ),
+ entry( 65377, "Print" ),
+ entry( 65301, "SysRq" )
+ );
+
+ private boolean mAltHeld;
+ private boolean mCtrlHeld;
+ private boolean mShiftHeld;
+ private String mRegularHeld = "";
+
+ private final PropertyChangeSupport mDispatcher =
+ new PropertyChangeSupport( this );
+
+ public KeyboardListener() {
+ }
+
+ public void addPropertyChangeListener(
+ final PropertyChangeListener listener ) {
+ mDispatcher.addPropertyChangeListener( listener );
+ }
+
+ public void removePropertyChangeListener(
+ final PropertyChangeListener listener ) {
+ mDispatcher.removePropertyChangeListener( listener );
+ }
+
+ @Override
public void nativeKeyPressed( final NativeKeyEvent e ) {
- System.out.println( "Key Pressed: " + getKeyText( e.getKeyCode() ) );
+ final String regularHeld = getDisplayText( e );
- if( isShiftDown( e ) ) {
- System.out.println( "SHIFTING" );
+ // If it's not a modifier key, broadcast the regular value.
+ if( !modifiers.contains( regularHeld.toLowerCase() ) ) {
+ tryFire( KEY_NAME_REGULAR, mRegularHeld, regularHeld );
+ mRegularHeld = regularHeld;
}
+
+ // If the modifier has changed, it'll be caught here.
+ updateModifiers( e );
}
+ @Override
public void nativeKeyReleased( final NativeKeyEvent e ) {
- System.out.println( "Key Released: " + getKeyText( e.getKeyCode() ) );
+ mRegularHeld = "";
+ updateModifiers( e );
}
+ @Override
public void nativeKeyTyped( final NativeKeyEvent e ) {
- System.out.println( "Key Typed: " + getKeyText( e.getKeyCode() ) );
+ }
+
+ private void updateModifiers( final NativeKeyEvent e ) {
+ final boolean alt = isAltDown( e );
+ final boolean ctrl = isControlDown( e );
+ final boolean shift = isShiftDown( e );
+
+ tryFire( KEY_NAME_ALT, mAltHeld, alt );
+ tryFire( KEY_NAME_CTRL, mCtrlHeld, ctrl );
+ tryFire( KEY_NAME_SHIFT, mShiftHeld, shift );
+
+ mAltHeld = alt;
+ mCtrlHeld = ctrl;
+ mShiftHeld = shift;
+ }
+
+ /**
+ * Called to fire the property change with the two given values differ.
+ *
+ * @param name The name of the property that has changed.
+ * @param o Old property value.
+ * @param n New property value.
+ */
+ @SuppressWarnings("SameParameterValue")
+ private void tryFire( final String name, final String o, final String n ) {
+ if( !o.equals( n ) ) {
+ mDispatcher.firePropertyChange( name, o, n );
+ }
+ }
+
+ /**
+ * Called to fire the property change with the two given values differ.
+ *
+ * @param name The name of the property that has changed.
+ * @param o Old property value.
+ * @param n New property value.
+ */
+ private void tryFire( final String name, final boolean o, final boolean n ) {
+ if( o != n ) {
+ mDispatcher.firePropertyChange( name, o, n );
+ }
+ }
+
+ /**
+ * Looks up the key code for the given event. If the key code is not mapped,
+ * this will return the default value from the native implementation.
+ *
+ * @param e The keyboard event that was triggered.
+ * @return The human-readable name for the key relating to the event.
+ */
+ private String getDisplayText( final NativeKeyEvent e ) {
+ return KEY_CODES.getOrDefault(
+ e.getRawCode(), getKeyText( e.getKeyCode() )
+ );
+ }
+
+ private boolean isModifierDown( final NativeKeyEvent e, final int mask ) {
+ return (e.getModifiers() & mask) != 0;
+ }
+
+ private boolean isAltDown( final NativeKeyEvent e ) {
+ return isModifierDown( e, ALT_MASK );
+ }
+
+ private boolean isControlDown( final NativeKeyEvent e ) {
+ return isModifierDown( e, CTRL_MASK );
}
private boolean isShiftDown( final NativeKeyEvent e ) {
- return (e.getModifiers() & SHIFT_MASK) != 0;
+ return isModifierDown( e, SHIFT_MASK );
}
}
src/main/com/whitemagicsoftware/kmcaster/listeners/MouseListener.java
public void nativeMouseClicked( NativeMouseEvent e ) {
- System.out.println( "Mouse Clicked: " + e.getClickCount() );
+// System.out.println( "Clicked # Times: " + e.getClickCount() );
+// System.out.println( "Button clicked: " + e.getButton() );
}
src/main/resources/images/key/dn/long.svg
-
+<svg height="11.615047mm" viewBox="0 0 26.855953 11.615047" width="26.855953mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(-.16684802 0 0 .16684802 246.07931 136.53605)" gradientUnits="userSpaceOnUse" x1="338.63031" x2="358.67578" y1="522.47595" y2="538.1333"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="93.49905376328" x2="97.32030889461" y1="223.35260247002" y2="225.96500031597"><stop offset="0" stop-color="#656565"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="186.60084629201" x2="186.0952300522" y1="190.18412772245" y2="188.07736113264"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="127.40402795705" x2="167.03895650385" y1="207.20908563895" y2="207.20908563895"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><linearGradient id="e" gradientUnits="userSpaceOnUse" x1="97.57964500446" x2="128.18176570951" y1="202.34699417516" y2="202.34699417516"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#c1c1c1"/></linearGradient><g transform="matrix(.26458333 0 0 .26458333 -24.147087 -49.43686)"><g fill-rule="evenodd"><path d="m93.585576 186.84799h92.457444c1.28583 0 2.321 1.03516 2.321 2.32099v29.65405h-97.067817l-.03162-29.65405c-.0015-1.28583 1.03516-2.32099 2.32099-2.32099z" fill="#656565"/><path d="m98.172195 224.99417h87.226151v5.733785h-87.226151z" fill="#929292"/><path d="m181.4457 190.06583h11.32169l.00001 28.78137h-11.3217z" fill="#d6d6d6"/><path d="m184.098 217.89605 8.6694.95115-.00001 8.40293c-.004 2.17337-1.73216 3.42204-3.5183 3.49725l-3.85075-.0194-4.24981-9.92456z" fill="url(#a)"/><path d="m97.279443 217.81178-5.98324 1.01125-.03162 8.4271c.0045 2.17337 1.73217 3.42204 3.518314 3.49725l3.844864-.0421 1.348336-9.8597z" fill="url(#b)"/><path d="m185.49759 192.44937 7.2698-2.38354c-.28879-2.2916-1.86117-3.11162-4.05202-3.15819-.56274-.012-1.02538-.0443-1.62231-.0544-.59693-.0102-1.95891-.00099-1.95891-.00099-1.37344.26896-2.44854 1.05576-3.2001 2.34598z" fill="url(#c)"/><rect fill="url(#d)" height="35.428242" ry="2.687675" stroke="url(#e)" stroke-width=".498687" width="89.195213" x="97.523109" y="189.49496"/></g><path d="m103.35277 208.14687h6.80658v7.74311h8.50861v-7.7496h6.80708l-11.06138-9.44605z" fill="none" stroke="#333" stroke-width="2.14047"/></g></svg>
src/main/resources/images/key/dn/medium.svg
-
+<svg height="11.615047mm" viewBox="0 0 19.917702 11.615047" width="19.917702mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(11.131698 0 0 4.4214115 197.45916 184.07423)" gradientUnits="userSpaceOnUse" x1="2.4162" x2="7.1659" y1="8.0492" y2="2.2273"><stop offset="0" stop-color="#cfcfcf"/><stop offset="1" stop-color="#efefef"/></linearGradient><linearGradient id="b" gradientTransform="matrix(-.16684802 0 0 .16684802 326.18477 136.53605)" gradientUnits="userSpaceOnUse" x1="338.63031" x2="358.67578" y1="522.47595" y2="538.1333"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="199.82784876328" x2="203.64910389461" y1="223.35260247002" y2="225.96500031597"><stop offset="0" stop-color="#656565"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="266.70633129201" x2="266.2007150522" y1="190.18412772245" y2="188.07736113264"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="e" gradientTransform="matrix(.35392719 0 0 .49979229 45.738149 113.76716)" gradientUnits="userSpaceOnUse" x1="506.54913" x2="586.02765" y1="186.9615" y2="186.9615"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><linearGradient id="f" gradientTransform="matrix(.35392719 0 0 .49979229 45.738149 113.76716)" gradientUnits="userSpaceOnUse" x1="447.48715" x2="524.77094" y1="177.84055" y2="177.84055"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#c1c1c1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.26458333 0 0 .26458333 -52.279924 -49.43686)"><path d="m206.05653 189.49496h56.89524c1.48898 0 2.68762 1.1987 2.68762 2.68768v30.05289c0 1.48898-1.19869 2.68763-2.68762 2.68763h-56.89524c-1.48898 0-2.68762-1.1987-2.68762-2.68763v-30.05289c0-1.48898 1.19869-2.68768 2.68762-2.68768z" fill="url(#a)" stroke-width=".498687"/><path d="m199.91437 186.84799h65.37035c1.28583 0 2.32099 1.03516 2.32099 2.32099v29.65405h-69.98071l-.0316-29.65405c-.001-1.28583 1.03516-2.32099 2.32099-2.32099z" fill="#656565"/><path d="m265.56489 192.09811v30.07932c0 1.25774-.95085 2.6037-2.20859 2.6037h-57.52857v.55145h57.52857c1.72017 0 2.9051-1.43497 2.9051-3.15515v-30.08081h-.69646z" fill="#fff" stroke-width=".498687"/><path d="m202.58707 224.99417h63.057961v5.733785h-63.057961z" fill="#929292"/><path d="m261.5512 190.06583h11.3217v28.78137h-11.3217z" fill="#d6d6d6"/><path d="m264.20347 217.89605 8.66943.95115v8.40293c-.005 2.17337-1.73219 3.42204-3.51834 3.49725l-3.85071-.0194-4.24982-9.92456z" fill="url(#b)"/><path d="m203.60824 217.81178-5.98324 1.01125-.0316 8.4271c.004 2.17337 1.73217 3.42204 3.51832 3.49725l3.84486-.0421 1.34834-9.8597z" fill="url(#c)"/><path d="m265.60309 192.44937 7.26981-2.38354c-.28879-2.2916-1.8612-3.11162-4.05203-3.15819-.56277-.012-1.02541-.0443-1.62233-.0544-.59693-.0102-1.9589-.00099-1.9589-.00099-1.37343.26896-2.44855 1.05576-3.20012 2.34598z" fill="url(#d)"/><rect fill="url(#e)" height="35.506744" ry="2.693631" stroke="url(#f)" stroke-width=".498687" width="63.303421" x="203.81265" y="189.45572"/></g></svg>
src/main/resources/images/key/dn/short.svg
-
+<svg height="11.615047mm" viewBox="0 0 12.362682 11.615047" width="12.362682mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(-.16684802 0 0 .16684802 457.8413 214.08468)" gradientUnits="userSpaceOnUse" x1="338.63031" x2="358.67578" y1="522.47595" y2="538.1333"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="360.03877876328" x2="363.86003389461" y1="300.90122247002" y2="303.51362031597"><stop offset="0" stop-color="#656565"/><stop offset="1" stop-color="#939393"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="398.36286129201" x2="397.8572450522" y1="267.73274772245" y2="265.62598113264"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="d" gradientTransform="matrix(.19208083 0 0 .50174705 278.16509 190.95032)" gradientUnits="userSpaceOnUse" x1="506.54913" x2="586.02765" y1="186.9615" y2="186.9615"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><linearGradient id="e" gradientTransform="matrix(.19208083 0 0 .50174705 278.16509 190.95032)" gradientUnits="userSpaceOnUse" x1="447.03323" x2="516.2417" y1="177.95511" y2="177.95511"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#b1b1b1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.26458333 0 0 .26458333 -94.66906 -69.95494)"><path d="m360.1253 264.39661h37.14661c1.28583 0 2.32099 1.03516 2.32099 2.32099v29.65406h-41.75697l-.0316-29.65406c-.001-1.28583 1.03516-2.32099 2.32099-2.32099z" fill="#656565"/><path d="m360.73083 302.54279h36.954876v5.733785h-36.954876z" fill="#929292"/><path d="m393.20774 267.61445h11.32169v28.78137h-11.32169z" fill="#d6d6d6"/><path d="m395.86 295.44468 8.66943.95114v8.40293c-.005 2.17337-1.73219 3.42204-3.51833 3.49725l-3.85072-.0194-4.24981-9.92456z" fill="url(#a)"/><path d="m363.81917 295.3604-5.98324 1.01126-.0316 8.42709c.004 2.17337 1.73217 3.42204 3.51832 3.49725l3.84486-.0421 1.34834-9.8597z" fill="url(#b)"/><path d="m397.25962 269.99799 7.26981-2.38354c-.28879-2.2916-1.8612-3.11162-4.05203-3.15819-.56277-.012-1.0254-.0443-1.62233-.0544-.59693-.0102-1.95889-.001-1.95889-.001-1.37344.26896-2.44856 1.05576-3.20013 2.34598z" fill="url(#c)"/><rect fill="url(#d)" height="35.645615" ry="2.704166" stroke="url(#e)" stroke-width=".498687" width="34.355576" x="363.95416" y="266.93491"/></g></svg>
src/main/resources/images/key/up/long.svg
-
+<svg height="11.615067mm" viewBox="0 0 26.856001 11.615066" width="26.856001mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="532.239029" x2="532.239029" y1="56.270133" y2="121.379983"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#f1f1f1"/></linearGradient><g transform="matrix(.13194458 0 0 .13194458 -57.080236 -6.35364)"><g fill-rule="evenodd"><path d="m437.26186 48.153839h185.40164c2.57843 0 4.65421 2.07578 4.65421 4.65421v59.464221h-194.64665l-.0634-59.464221c-.003-2.57843 2.07577-4.65421 4.6542-4.65421z" fill="#e5e5e5"/><path d="m446.45923 124.64703h174.91151v11.497757h-174.91151z" fill="#e5e5e5"/><path d="m613.44466 54.606459h22.70299l.00002 57.714271h-22.70301z" fill="#e5e5e5"/><path d="m618.76322 110.41343 17.38445 1.9073-.00002 16.8501c-.009 4.35818-3.47345 6.86209-7.05514 7.0129l-7.72176-.0389-8.52199-19.90136z" fill="#e5e5e5"/><path d="m444.66904 110.24444-11.99798 2.02783-.0634 16.89856c.009 4.35818 3.47346 6.86209 7.05515 7.0129l7.70997-.0845 2.70377-19.77131z" fill="#e5e5e5"/><path d="m621.56976 59.386089 14.57789-4.77963c-.5791-4.59526-3.73214-6.23962-8.12538-6.33301-1.12844-.024-2.05615-.0888-3.25316-.10917-1.19701-.0204-3.92813-.002-3.92813-.002-2.75412.53934-4.90998 2.11709-6.41705 4.70431z" fill="#e5e5e5"/><rect fill="#f8f8f8" height="71.042999" ry="5.3895" stroke="url(#a)" width="178.86" x="445.15765" y="53.461731"/></g><path d="m456.84767 90.863729h13.649v15.527001h17.062v-15.540001h13.65l-22.181-18.94184z" fill="none" stroke="#e5e5e5" stroke-width="4.2922"/></g></svg>
src/main/resources/images/key/up/medium.svg
-
+<svg height="11.615121mm" viewBox="0 0 19.917834 11.61512" width="19.917833mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(22.322 0 0 8.8661 264.96 40.648232)" gradientUnits="userSpaceOnUse" x1="2.4162" x2="7.1659" y1="8.0492" y2="2.2273"><stop offset="0" stop-color="#cfcfcf"/><stop offset="1" stop-color="#efefef"/></linearGradient><linearGradient id="b" gradientTransform="matrix(.70971768 0 0 1.0022158 -39.280779 -100.33605)" gradientUnits="userSpaceOnUse" x1="533.71136" x2="533.71136" y1="154.2484" y2="219.35825"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#f1f1f1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.1319452 0 0 .1319452 -34.995713 -6.09723)"><path d="m282.2 51.518232h114.09c2.9858 0 5.3894 2.4037 5.3894 5.3895v60.263998c0 2.9858-2.4037 5.3894-5.3894 5.3894h-114.09c-2.9858 0-5.3894-2.4037-5.3894-5.3894v-60.263998c0-2.9858 2.4037-5.3895 5.3894-5.3895z" fill="url(#a)"/><path d="m270.06712 46.210342h131.08484c2.57843 0 4.65421 2.07578 4.65421 4.65421v59.464218h-140.32985l-.0634-59.464218c-.003-2.57843 2.07577-4.65421 4.6542-4.65421z" fill="#e5e5e5"/><path d="m401.53 56.738232v60.316998c0 2.5221-1.9067 5.2211-4.4288 5.2211h-115.36v1.1058h115.36c3.4494 0 5.8255-2.8775 5.8255-6.3269v-60.319998h-1.3966z" fill="#fff"/><g fill="#e5e5e5"><path d="m275.2428 122.70352h126.4479v11.497757h-126.4479z"/><path d="m393.4815 52.662962h22.703v57.714268h-22.703z"/><path d="m398.8 108.46993 17.3845 1.9073v16.8501c-.01 4.35818-3.4735 6.86209-7.0552 7.0129l-7.7217-.0389-8.522-19.90136z"/><path d="m277.29053 108.30094-11.99798 2.02783-.0634 16.89856c.009 4.35818 3.47346 6.86209 7.05515 7.0129l7.70997-.0845 2.70377-19.77131z"/><path d="m401.6066 57.442592 14.5779-4.77963c-.5791-4.59526-3.7322-6.23962-8.1254-6.33301-1.1285-.024-2.0562-.0888-3.2532-.10917-1.197-.0204-3.9281-.002-3.9281-.002-2.7541.53934-4.91 2.11709-6.4171 4.70431z"/></g><rect fill="#f8f8f8" height="71.200417" ry="5.401443" stroke="url(#b)" width="126.94011" x="277.70044" y="51.439529"/></g></svg>
src/main/resources/images/key/up/short.svg
-
+<svg height="11.615015mm" viewBox="0 0 12.362655 11.615015" width="12.362656mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(.38517289 0 0 1.0061356 -19.83415 -104.25445)" gradientUnits="userSpaceOnUse" x1="533.71136" x2="533.71136" y1="154.2484" y2="219.35825"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#f1f1f1"/></linearGradient><g fill-rule="evenodd" transform="matrix(.131944 0 0 .131944 -18.45416 -5.67686)"><g fill="#e5e5e5"><path d="m144.51777 43.024793h74.48877c2.57843 0 4.65421 2.07578 4.65421 4.65421v59.464217h-83.73378l-.0634-59.464217c-.003-2.57843 2.07577-4.65421 4.6542-4.65421z"/><path d="m145.73203 119.51796h74.104309v11.497757h-74.104309z"/><path d="m210.8568 49.477413h22.703v57.714267h-22.703z"/><path d="m216.1753 105.28438 17.3845 1.9073v16.8501c-.01 4.35818-3.4735 6.86209-7.0552 7.0129l-7.7217-.0389-8.522-19.90136z"/><path d="m151.92495 105.11539-11.99798 2.02783-.0634 16.89856c.009 4.35818 3.47346 6.86209 7.05515 7.0129l7.70997-.0845 2.70377-19.77131z"/><path d="m218.9819 54.257043 14.5779-4.77963c-.5791-4.59526-3.7322-6.23962-8.1254-6.33301-1.1285-.024-2.0562-.0888-3.2532-.10917-1.197-.0204-3.9281-.002-3.9281-.002-2.7541.53934-4.91 2.11709-6.4171 4.70431z"/></g><rect fill="#f8f8f8" height="71.478889" ry="5.422568" stroke="url(#a)" width="68.892021" x="152.19562" y="48.114742"/></g></svg>
src/main/resources/images/mouse/0.svg
-
+<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="675.16781095345" x2="726.91040621336" y1="193.5974546131" y2="193.5974546131"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="694.62630016049" x2="706.30293766591" y1="170.04024231137" y2="170.04024231137"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="matrix(.11019174 0 0 .11019174 -74.07199 -16.55124)"><path d="m728.71927 191.15556c0 25.31414-12.65005 45.83532-28.25465 45.83532s-28.25465-20.52118-28.25465-45.83532 12.87203-40.95154 28.47664-40.95154c15.6046 0 28.03266 15.6374 28.03266 40.95154z" fill="url(#a)"/><g stroke="#333"><path d="m700.46462 150.76421v38.00227" fill="none" stroke-linecap="round"/><path d="m727.85189 184.1953c-16.7914 6.29576-36.32862 6.68664-54.76049 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="25.528791" rx="5.216753" width="10.433506" x="695.24786" y="157.27585"/></g></g></svg>
src/main/resources/images/mouse/1.svg
-
+<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><path d="m-215.44807 184.20884c-.95261 0-1.73653.55323-2.24371 1.28803-.50884.73718-.75361 1.66727-.82783 2.43428 1.07427.36049 1.94146.53162 3.07154.53069z" fill="#0096ff" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g></g></svg>
src/main/resources/images/mouse/2.svg
-
+<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g><rect fill="#ff1500" fill-opacity=".25" fill-rule="evenodd" height="2.700655" rx=".537201" ry=".551873" width="1.074401" x="-215.98364" y="185.04196"/></g></svg>
src/main/resources/images/mouse/3.svg
-
+<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><path d="m-215.44627 184.21104c1.05121 0 1.75568.55287 2.26286 1.28767.50884.73718.73446 1.66763.80868 2.43464-1.07427.36049-1.94146.53162-3.07154.53069z" fill="#40ff00" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g></g></svg>
src/main/resources/images/mouse/all.svg
-
+<svg height="9.563195mm" viewBox="0 0 6.2268581 9.5631952" width="6.226858mm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-218.23392109934" x2="-212.53231434848" y1="188.98810309963" y2="188.98810309963"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#656565"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-216.08975626054" x2="-214.80308722328" y1="186.3922928196" y2="186.3922928196"><stop offset="0" stop-color="#d6d6d6"/><stop offset="1" stop-color="#939393"/></linearGradient><g transform="translate(218.55985 -184.2065)"><path d="m-212.333 188.71902c0 2.78941-1.39393 5.05068-3.11342 5.05068-1.7195 0-3.11343-2.26127-3.11343-5.05068s1.41839-4.51252 3.13789-4.51252c1.71949 0 3.08896 1.72311 3.08896 4.51252z" fill="url(#a)"/><path d="m-215.44627 184.21104c1.05121 0 1.75568.55287 2.26286 1.28767.50884.73718.73446 1.66763.80868 2.43464-1.07427.36049-1.94146.53162-3.07154.53069z" fill="#40ff00" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><path d="m-215.44807 184.20884c-.95261 0-1.73653.55323-2.24371 1.28803-.50884.73718-.75361 1.66727-.82783 2.43428 1.07427.36049 1.94146.53162 3.07154.53069z" fill="#0096ff" fill-opacity=".25" fill-rule="evenodd" stroke-width=".268987"/><g stroke="#333" stroke-width=".110192"><path d="m-215.44642 184.26823v4.18754" fill="none" stroke-linecap="round"/><path d="m-212.42857 187.95206c-1.85028.69374-4.00312.73681-6.03416 0" fill="none" stroke-linecap="round" stroke-linejoin="bevel"/><rect fill="url(#b)" fill-rule="evenodd" height="2.813062" rx=".574843" width="1.149686" x="-216.02127" y="184.98576"/></g><rect fill="#ff1500" fill-opacity=".25" fill-rule="evenodd" height="2.700655" rx=".537201" ry=".551873" width="1.074401" x="-215.98364" y="185.04196"/></g></svg>

Add dispatch of keyboard events

Author DaveJarvis <email>
Date 2020-07-15 23:46:44 GMT-0700
Commit 16a674206c9cebb5ff0704d8ca55a5af2e3313d5
Parent 978a272
Delta 425 lines added, 56 lines removed, 369-line increase