Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/kmcaster.git

Separate files for key and mouse events

Author DaveJarvis <email>
Date 2020-07-15 20:12:10 GMT-0700
Commit 08c8eb59bf499fe92c422878e239e78868b9bf0e
Parent 968b915
.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 beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/images/keys.svg" beforeDir="false" afterPath="$PROJECT_DIR$/images/keys.svg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" 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" />
</list>
</state>
</system>
+ </component>
+ <component name="FileTemplateManagerImpl">
+ <option name="RECENT_TEMPLATES">
+ <list>
+ <option value="Class" />
+ </list>
+ </option>
</component>
<component name="Git.Settings">
<property name="settings.editor.selected.configurable" value="reference.settingsdialog.project.gradle" />
<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.listeners" />
+ </key>
</component>
<component name="RunManager">
</state>
<state x="813" y="683" width="218" height="250" key="#Notifications/0.28.2560.1529@0.28.2560.1529" timestamp="1594856235998" />
- <state x="710" y="704" width="425" height="207" key="DetectedRootsChooserDialog" timestamp="1594855895029">
+ <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="710" y="704" width="425" height="207" key="DetectedRootsChooserDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594855895029" />
+ <state x="745" y="737" key="#com.intellij.refactoring.move.MoveHandler.SelectRefactoringDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594860488340" />
+ <state x="707" y="657" width="431" height="302" key="#com.intellij.refactoring.move.moveInner.MoveInnerDialog" timestamp="1594860490819">
+ <screen x="0" y="28" width="2560" height="1529" />
+ </state>
+ <state x="707" y="657" width="431" height="302" key="#com.intellij.refactoring.move.moveInner.MoveInnerDialog/0.28.2560.1529@0.28.2560.1529" timestamp="1594860490819" />
+ <state x="567" y="28" width="711" height="1526" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1594858565314">
+ <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">
+ <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">
+ <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">
+ <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">
+ <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">
+ <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">
<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="1594858076497">
+ <state x="589" y="477" width="672" height="678" key="search.everywhere.popup" timestamp="1594858571847">
<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="1594858076497" />
+ <state x="589" y="477" width="672" height="678" key="search.everywhere.popup/0.28.2560.1529@0.28.2560.1529" timestamp="1594858571847" />
</component>
</project>
build.gradle
dependencies {
+ implementation 'com.kitfox.svg:svg-salamander:1.0'
+
implementation 'com.1stleg:jnativehook:2.1.0'
}
images/key/dn/alphanum.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="svg3497"
+ version="1.1"
+ viewBox="0 0 12.362682 11.615047"
+ height="11.615047mm"
+ width="12.362682mm">
+ <defs
+ id="defs3491">
+ <linearGradient
+ xlink:href="#linearGradient3276"
+ id="linearGradient991"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.16684802,0,0,0.16684802,457.8413,214.08468)"
+ x1="338.63031"
+ y1="522.47595"
+ x2="358.67578"
+ y2="538.1333" />
+ <linearGradient
+ id="linearGradient3276">
+ <stop
+ id="stop3278"
+ offset="0"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ id="stop3280"
+ offset="1"
+ style="stop-color:#939393;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ xlink:href="#linearGradient3262"
+ id="linearGradient993"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.16684802,0,0,0.16684802,304.4924,214.08468)"
+ x1="332.91602"
+ y1="520.33307"
+ x2="355.81863"
+ y2="535.99042" />
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ xlink:href="#linearGradient3296"
+ id="linearGradient995"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.16684802,0,0,0.16684802,310.08151,212.00639)"
+ x1="529.11237"
+ y1="333.99472"
+ x2="526.08197"
+ y2="321.36786" />
+ <linearGradient
+ id="linearGradient3296">
+ <stop
+ style="stop-color:#d6d6d6;stop-opacity:1;"
+ offset="0"
+ id="stop3298" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="1"
+ id="stop3300" />
+ </linearGradient>
+ <linearGradient
+ xlink:href="#linearGradient3248"
+ id="linearGradient997"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.19208083,0,0,0.50174705,278.16509,190.95032)"
+ x1="506.54913"
+ y1="186.9615"
+ x2="586.02765"
+ y2="186.9615" />
+ <linearGradient
+ id="linearGradient3248">
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1;"
+ offset="0"
+ id="stop3250" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1;"
+ offset="1"
+ id="stop3252" />
+ </linearGradient>
+ <linearGradient
+ xlink:href="#linearGradient8130"
+ id="linearGradient999"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.19208083,0,0,0.50174705,278.16509,190.95032)"
+ x1="447.03323"
+ y1="177.95511"
+ x2="516.2417"
+ y2="177.95511" />
+ <linearGradient
+ id="linearGradient8130">
+ <stop
+ id="stop8126"
+ offset="0"
+ style="stop-color:#f1f1f1;stop-opacity:1" />
+ <stop
+ id="stop8128"
+ offset="1"
+ style="stop-color:#b1b1b1;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata3494">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-393.71747,-320.00796)"
+ id="layer1">
+ <g
+ transform="matrix(0.26458333,0,0,0.26458333,299.04841,250.05302)"
+ id="g1247">
+ <path
+ id="path975"
+ style="fill:#656565;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.037;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 360.1253,264.39661 h 37.14661 c 1.28583,0 2.32099,1.03516 2.32099,2.32099 v 29.65406 h -41.75697 l -0.0316,-29.65406 c -10e-4,-1.28583 1.03516,-2.32099 2.32099,-2.32099 z" />
+ <rect
+ style="fill:#929292;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.162901;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect977"
+ width="36.954876"
+ height="5.7337852"
+ x="360.73083"
+ y="302.54279"
+ rx="0"
+ ry="0" />
+ <path
+ d="m 393.20774,267.61445 h 11.32169 v 28.78137 h -11.32169 z"
+ style="fill:#d6d6d6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.280438;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path979" />
+ <path
+ id="path981"
+ d="m 395.86,295.44468 8.66943,0.95114 v 8.40293 c -0.005,2.17337 -1.73219,3.42204 -3.51833,3.49725 l -3.85072,-0.0194 -4.24981,-9.92456 z"
+ style="fill:url(#linearGradient991);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ style="fill:url(#linearGradient993);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 363.81917,295.3604 -5.98324,1.01126 -0.0316,8.42709 c 0.004,2.17337 1.73217,3.42204 3.51832,3.49725 l 3.84486,-0.0421 1.34834,-9.8597 z"
+ id="path983" />
+ <path
+ style="fill:url(#linearGradient995);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 397.25962,269.99799 7.26981,-2.38354 c -0.28879,-2.2916 -1.8612,-3.11162 -4.05203,-3.15819 -0.56277,-0.012 -1.0254,-0.0443 -1.62233,-0.0544 -0.59693,-0.0102 -1.95889,-10e-4 -1.95889,-10e-4 -1.37344,0.26896 -2.44856,1.05576 -3.20013,2.34598 z"
+ id="path985" />
+ <rect
+ x="363.95416"
+ y="266.93491"
+ width="34.355576"
+ height="35.645615"
+ ry="2.7041659"
+ style="fill:url(#linearGradient997);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient999);stroke-width:0.498687;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect987" />
+ </g>
+ </g>
+</svg>
images/key/dn/modifier.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="svg2721"
+ version="1.1"
+ viewBox="0 0 19.917702 11.615047"
+ height="11.615047mm"
+ width="19.917702mm">
+ <defs
+ id="defs2715">
+ <linearGradient
+ x1="2.4161999"
+ y1="8.0492001"
+ gradientTransform="matrix(11.131698,0,0,4.4214115,197.45916,184.07423)"
+ x2="7.1659002"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient607"
+ y2="2.2272999"
+ id="linearGradient50930" />
+ <linearGradient
+ id="linearGradient607">
+ <stop
+ offset="0"
+ style="stop-color:#cfcfcf"
+ id="stop608" />
+ <stop
+ offset="1"
+ style="stop-color:#efefef"
+ id="stop609" />
+ </linearGradient>
+ <linearGradient
+ y2="538.1333"
+ x2="358.67578"
+ y1="522.47595"
+ x1="338.63031"
+ gradientTransform="matrix(-0.16684802,0,0,0.16684802,326.18477,136.53605)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8226"
+ xlink:href="#linearGradient3276" />
+ <linearGradient
+ id="linearGradient3276">
+ <stop
+ id="stop3278"
+ offset="0"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ id="stop3280"
+ offset="1"
+ style="stop-color:#939393;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ y2="535.99042"
+ x2="355.81863"
+ y1="520.33307"
+ x1="332.91602"
+ gradientTransform="matrix(0.16684802,0,0,0.16684802,144.28147,136.53606)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8224"
+ xlink:href="#linearGradient3262" />
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ y2="321.36786"
+ x2="526.08197"
+ y1="333.99472"
+ x1="529.11237"
+ gradientTransform="matrix(0.16684802,0,0,0.16684802,178.42498,134.45777)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8222"
+ xlink:href="#linearGradient3296" />
+ <linearGradient
+ id="linearGradient3296">
+ <stop
+ style="stop-color:#d6d6d6;stop-opacity:1;"
+ offset="0"
+ id="stop3298" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="1"
+ id="stop3300" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(0.35392719,0,0,0.49979229,45.738149,113.76716)"
+ y2="186.9615"
+ x2="586.02765"
+ y1="186.9615"
+ x1="506.54913"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8218"
+ xlink:href="#linearGradient3248" />
+ <linearGradient
+ id="linearGradient3248">
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1;"
+ offset="0"
+ id="stop3250" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1;"
+ offset="1"
+ id="stop3252" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(0.35392719,0,0,0.49979229,45.738149,113.76716)"
+ y2="177.84055"
+ x2="524.77094"
+ y1="177.84055"
+ x1="447.48715"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8220"
+ xlink:href="#linearGradient1165" />
+ <linearGradient
+ id="linearGradient1165">
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="0"
+ id="stop1161" />
+ <stop
+ style="stop-color:#c1c1c1;stop-opacity:1"
+ offset="1"
+ id="stop1163" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata2718">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-112.50544,-272.38295)"
+ id="layer1">
+ <g
+ transform="matrix(0.26458333,0,0,0.26458333,60.225516,222.94609)"
+ id="g1280">
+ <path
+ id="rect49938"
+ style="fill:url(#linearGradient50930);fill-rule:evenodd;stroke-width:0.498687"
+ d="m 206.05653,189.49496 h 56.89524 c 1.48898,0 2.68762,1.1987 2.68762,2.68768 v 30.05289 c 0,1.48898 -1.19869,2.68763 -2.68762,2.68763 h -56.89524 c -1.48898,0 -2.68762,-1.1987 -2.68762,-2.68763 v -30.05289 c 0,-1.48898 1.19869,-2.68768 2.68762,-2.68768 z" />
+ <path
+ d="m 199.91437,186.84799 h 65.37035 c 1.28583,0 2.32099,1.03516 2.32099,2.32099 v 29.65405 H 197.625 l -0.0316,-29.65405 c -0.001,-1.28583 1.03516,-2.32099 2.32099,-2.32099 z"
+ style="fill:#656565;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.037;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path8375" />
+ <path
+ id="path49946"
+ style="fill:#ffffff;fill-rule:evenodd;stroke-width:0.498687"
+ d="m 265.56489,192.09811 v 30.07932 c 0,1.25774 -0.95085,2.6037 -2.20859,2.6037 h -57.52857 v 0.55145 h 57.52857 c 1.72017,0 2.9051,-1.43497 2.9051,-3.15515 v -30.08081 h -0.69646 z" />
+ <rect
+ style="fill:#929292;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.212794;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect8194"
+ width="63.057961"
+ height="5.7337852"
+ x="202.58707"
+ y="224.99417"
+ rx="0"
+ ry="0" />
+ <path
+ d="m 261.5512,190.06583 h 11.3217 v 28.78137 h -11.3217 z"
+ style="fill:#d6d6d6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.280438;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path8196" />
+ <path
+ id="path8198"
+ d="m 264.20347,217.89605 8.66943,0.95115 v 8.40293 c -0.005,2.17337 -1.73219,3.42204 -3.51834,3.49725 l -3.85071,-0.0194 -4.24982,-9.92456 z"
+ style="fill:url(#linearGradient8226);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ style="fill:url(#linearGradient8224);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 203.60824,217.81178 -5.98324,1.01125 -0.0316,8.4271 c 0.004,2.17337 1.73217,3.42204 3.51832,3.49725 l 3.84486,-0.0421 1.34834,-9.8597 z"
+ id="path8200" />
+ <path
+ style="fill:url(#linearGradient8222);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 265.60309,192.44937 7.26981,-2.38354 c -0.28879,-2.2916 -1.8612,-3.11162 -4.05203,-3.15819 -0.56277,-0.012 -1.02541,-0.0443 -1.62233,-0.0544 -0.59693,-0.0102 -1.9589,-9.9e-4 -1.9589,-9.9e-4 -1.37343,0.26896 -2.44855,1.05576 -3.20012,2.34598 z"
+ id="path8202" />
+ <rect
+ x="203.81265"
+ y="189.45572"
+ width="63.303421"
+ height="35.506744"
+ ry="2.6936307"
+ style="fill:url(#linearGradient8218);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8220);stroke-width:0.498687;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect8204" />
+ </g>
+ </g>
+</svg>
images/key/dn/shift.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="svg1961"
+ version="1.1"
+ viewBox="0 0 26.855953 11.615047"
+ height="11.615047mm"
+ width="26.855953mm">
+ <defs
+ id="defs1955">
+ <linearGradient
+ y2="538.1333"
+ x2="358.67578"
+ y1="522.47595"
+ x1="338.63031"
+ gradientTransform="matrix(-0.16684802,0,0,0.16684802,246.07931,136.53605)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8138"
+ xlink:href="#linearGradient3276" />
+ <linearGradient
+ id="linearGradient3276">
+ <stop
+ id="stop3278"
+ offset="0"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ id="stop3280"
+ offset="1"
+ style="stop-color:#939393;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ y2="535.99042"
+ x2="355.81863"
+ y1="520.33307"
+ x1="332.91602"
+ gradientTransform="matrix(0.16684802,0,0,0.16684802,37.952675,136.53606)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8142"
+ xlink:href="#linearGradient3262" />
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ y2="321.36786"
+ x2="526.08197"
+ y1="333.99472"
+ x1="529.11237"
+ gradientTransform="matrix(0.16684802,0,0,0.16684802,98.319495,134.45777)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8146"
+ xlink:href="#linearGradient3296" />
+ <linearGradient
+ id="linearGradient3296">
+ <stop
+ style="stop-color:#d6d6d6;stop-opacity:1;"
+ offset="0"
+ id="stop3298" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="1"
+ id="stop3300" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(0.4986873,0,0,0.4986873,-125.20559,113.97376)"
+ y2="186.9615"
+ x2="586.02765"
+ y1="186.9615"
+ x1="506.54913"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8134"
+ xlink:href="#linearGradient3248" />
+ <linearGradient
+ id="linearGradient3248">
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1;"
+ offset="0"
+ id="stop3250" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1;"
+ offset="1"
+ id="stop3252" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(0.4986873,0,0,0.4986873,-125.20559,113.97376)"
+ y2="177.21172"
+ x2="508.1087"
+ y1="177.21172"
+ x1="446.74335"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8124"
+ xlink:href="#linearGradient1165" />
+ <linearGradient
+ id="linearGradient1165">
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="0"
+ id="stop1161" />
+ <stop
+ style="stop-color:#c1c1c1;stop-opacity:1"
+ offset="1"
+ id="stop1163" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata1958">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-16.810118,-193.00795)"
+ id="layer1">
+ <g
+ id="g1290"
+ transform="matrix(0.26458333,0,0,0.26458333,-7.3369685,143.57109)">
+ <path
+ id="rect8152"
+ style="fill:#656565;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.037;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 93.585576,186.84799 h 92.457444 c 1.28583,0 2.321,1.03516 2.321,2.32099 v 29.65405 H 91.296203 l -0.03162,-29.65405 c -0.0015,-1.28583 1.03516,-2.32099 2.32099,-2.32099 z" />
+ <rect
+ ry="0"
+ rx="0"
+ y="224.99417"
+ x="98.172195"
+ height="5.7337852"
+ width="87.226151"
+ id="rect8150"
+ style="fill:#929292;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ id="rect8148"
+ style="fill:#d6d6d6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.280438;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 181.4457,190.06583 h 11.32169 l 1e-5,28.78137 h -11.3217 z" />
+ <path
+ style="fill:url(#linearGradient8138);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 184.098,217.89605 8.6694,0.95115 -1e-5,8.40293 c -0.004,2.17337 -1.73216,3.42204 -3.5183,3.49725 l -3.85075,-0.0194 -4.24981,-9.92456 z"
+ id="path8136" />
+ <path
+ id="path8140"
+ d="m 97.279443,217.81178 -5.98324,1.01125 -0.03162,8.4271 c 0.0045,2.17337 1.73217,3.42204 3.518314,3.49725 l 3.844864,-0.0421 1.348336,-9.8597 z"
+ style="fill:url(#linearGradient8142);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ id="path8144"
+ d="m 185.49759,192.44937 7.2698,-2.38354 c -0.28879,-2.2916 -1.86117,-3.11162 -4.05202,-3.15819 -0.56274,-0.012 -1.02538,-0.0443 -1.62231,-0.0544 -0.59693,-0.0102 -1.95891,-9.9e-4 -1.95891,-9.9e-4 -1.37344,0.26896 -2.44854,1.05576 -3.2001,2.34598 z"
+ style="fill:url(#linearGradient8146);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.250272;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ id="rect46615"
+ style="fill:url(#linearGradient8134);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8124);stroke-width:0.498687;stroke-opacity:1"
+ ry="2.6876752"
+ height="35.428242"
+ width="89.195213"
+ y="189.49496"
+ x="97.523109" />
+ <path
+ id="path47954"
+ style="fill:none;fill-opacity:1;stroke:#333333;stroke-width:2.14047;stroke-opacity:1"
+ d="m 103.35277,208.14687 h 6.80658 v 7.74311 c 2.8362,0 5.67241,0 8.50861,0 v -7.7496 h 6.80708 l -11.06138,-9.44605 z" />
+ </g>
+ </g>
+</svg>
images/key/up/alphanum.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="svg3497"
+ version="1.1"
+ viewBox="0 0 12.362655 11.615015"
+ height="11.615015mm"
+ width="12.362656mm">
+ <defs
+ id="defs3491">
+ <linearGradient
+ id="linearGradient3276">
+ <stop
+ id="stop3278"
+ offset="0"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ id="stop3280"
+ offset="1"
+ style="stop-color:#939393;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3296">
+ <stop
+ style="stop-color:#d6d6d6;stop-opacity:1;"
+ offset="0"
+ id="stop3298" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="1"
+ id="stop3300" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3248">
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1;"
+ offset="0"
+ id="stop3250" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1;"
+ offset="1"
+ id="stop3252" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8130">
+ <stop
+ id="stop8126"
+ offset="0"
+ style="stop-color:#f1f1f1;stop-opacity:1" />
+ <stop
+ id="stop8128"
+ offset="1"
+ style="stop-color:#b1b1b1;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ y2="219.35825"
+ x2="533.71136"
+ y1="154.2484"
+ x1="533.71136"
+ gradientTransform="matrix(0.38517289,0,0,1.0061356,-19.83415,-104.25445)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8460"
+ xlink:href="#linearGradient8190" />
+ <linearGradient
+ id="linearGradient8190">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0"
+ id="stop8186" />
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="1"
+ id="stop8188" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata3494">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-383.37841,-329.27225)"
+ id="layer1">
+ <g
+ transform="matrix(0.131944,0,0,0.131944,364.92425,323.59539)"
+ id="g8476">
+ <path
+ id="path8436"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.07946;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 144.51777,43.024793 h 74.48877 c 2.57843,0 4.65421,2.07578 4.65421,4.65421 v 59.464217 h -83.73378 l -0.0634,-59.464217 c -0.003,-2.57843 2.07577,-4.65421 4.6542,-4.65421 z" />
+ <rect
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.32666;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect8438"
+ width="74.104309"
+ height="11.497757"
+ x="145.73203"
+ y="119.51796"
+ rx="0"
+ ry="0" />
+ <path
+ d="m 210.8568,49.477413 h 22.703 v 57.714267 h -22.703 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.562353;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path8440" />
+ <path
+ id="path8442"
+ d="m 216.1753,105.28438 17.3845,1.9073 v 16.8501 c -0.01,4.35818 -3.4735,6.86209 -7.0552,7.0129 l -7.7217,-0.0389 -8.522,-19.90136 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 151.92495,105.11539 -11.99798,2.02783 -0.0634,16.89856 c 0.009,4.35818 3.47346,6.86209 7.05515,7.0129 l 7.70997,-0.0845 2.70377,-19.77131 z"
+ id="path8444" />
+ <path
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 218.9819,54.257043 14.5779,-4.77963 c -0.5791,-4.59526 -3.7322,-6.23962 -8.1254,-6.33301 -1.1285,-0.024 -2.0562,-0.0888 -3.2532,-0.10917 -1.197,-0.0204 -3.9281,-0.002 -3.9281,-0.002 -2.7541,0.53934 -4.91,2.11709 -6.4171,4.70431 z"
+ id="path8446" />
+ <rect
+ x="152.19562"
+ y="48.114742"
+ width="68.892021"
+ height="71.478889"
+ ry="5.4225683"
+ style="fill:#f8f8f8;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8460);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect8448" />
+ </g>
+ </g>
+</svg>
images/key/up/modifier.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="svg2721"
+ version="1.1"
+ viewBox="0 0 19.917834 11.61512"
+ height="11.615121mm"
+ width="19.917833mm">
+ <defs
+ id="defs2715">
+ <linearGradient
+ id="linearGradient607">
+ <stop
+ offset="0"
+ style="stop-color:#cfcfcf"
+ id="stop608" />
+ <stop
+ offset="1"
+ style="stop-color:#efefef"
+ id="stop609" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3276">
+ <stop
+ id="stop3278"
+ offset="0"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ id="stop3280"
+ offset="1"
+ style="stop-color:#939393;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3296">
+ <stop
+ style="stop-color:#d6d6d6;stop-opacity:1;"
+ offset="0"
+ id="stop3298" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="1"
+ id="stop3300" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3248">
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1;"
+ offset="0"
+ id="stop3250" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1;"
+ offset="1"
+ id="stop3252" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient1165">
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="0"
+ id="stop1161" />
+ <stop
+ style="stop-color:#c1c1c1;stop-opacity:1"
+ offset="1"
+ id="stop1163" />
+ </linearGradient>
+ <linearGradient
+ y2="2.2272999"
+ x2="7.1659002"
+ y1="8.0492001"
+ x1="2.4161999"
+ gradientTransform="matrix(22.322,0,0,8.8661,264.96,40.648232)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8276"
+ xlink:href="#linearGradient607" />
+ <linearGradient
+ y2="219.35825"
+ x2="533.71136"
+ y1="154.2484"
+ x1="533.71136"
+ gradientTransform="matrix(0.70971768,0,0,1.0022158,-39.280779,-100.33605)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8268"
+ xlink:href="#linearGradient8190" />
+ <linearGradient
+ id="linearGradient8190">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0"
+ id="stop8186" />
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="1"
+ id="stop8188" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata2718">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-96.215422,-244.36929)"
+ id="layer1">
+ <g
+ transform="matrix(0.1319452,0,0,0.1319452,61.219709,238.27206)"
+ id="g8487">
+ <path
+ d="m 282.2,51.518232 h 114.09 c 2.9858,0 5.3894,2.4037 5.3894,5.3895 v 60.263998 c 0,2.9858 -2.4037,5.3894 -5.3894,5.3894 H 282.2 c -2.9858,0 -5.3894,-2.4037 -5.3894,-5.3894 V 56.907732 c 0,-2.9858 2.4037,-5.3895 5.3894,-5.3895 z"
+ style="fill:url(#linearGradient8276);fill-rule:evenodd"
+ id="path8248" />
+ <path
+ id="path8386"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.07946;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 270.06712,46.210342 h 131.08484 c 2.57843,0 4.65421,2.07578 4.65421,4.65421 V 110.32877 H 265.47632 l -0.0634,-59.464218 c -0.003,-2.57843 2.07577,-4.65421 4.6542,-4.65421 z" />
+ <path
+ d="m 401.53,56.738232 v 60.316998 c 0,2.5221 -1.9067,5.2211 -4.4288,5.2211 h -115.36 v 1.1058 h 115.36 c 3.4494,0 5.8255,-2.8775 5.8255,-6.3269 V 56.735232 h -1.3966 z"
+ style="fill:#ffffff;fill-rule:evenodd"
+ id="path8250" />
+ <rect
+ ry="0"
+ rx="0"
+ y="122.70352"
+ x="275.2428"
+ height="11.497757"
+ width="126.4479"
+ id="rect8254"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.426708;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ id="path8256"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.562353;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 393.4815,52.662962 h 22.703 v 57.714268 h -22.703 z" />
+ <path
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 398.8,108.46993 17.3845,1.9073 v 16.8501 c -0.01,4.35818 -3.4735,6.86209 -7.0552,7.0129 l -7.7217,-0.0389 -8.522,-19.90136 z"
+ id="path8258" />
+ <path
+ id="path8260"
+ d="m 277.29053,108.30094 -11.99798,2.02783 -0.0634,16.89856 c 0.009,4.35818 3.47346,6.86209 7.05515,7.0129 l 7.70997,-0.0845 2.70377,-19.77131 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ id="path8262"
+ d="m 401.6066,57.442592 14.5779,-4.77963 c -0.5791,-4.59526 -3.7322,-6.23962 -8.1254,-6.33301 -1.1285,-0.024 -2.0562,-0.0888 -3.2532,-0.10917 -1.197,-0.0204 -3.9281,-0.002 -3.9281,-0.002 -2.7541,0.53934 -4.91,2.11709 -6.4171,4.70431 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ id="rect8264"
+ style="fill:#f8f8f8;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8268);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ ry="5.4014425"
+ height="71.200417"
+ width="126.94011"
+ y="51.439529"
+ x="277.70044" />
+ </g>
+ </g>
+</svg>
images/key/up/shift.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ id="svg1961"
+ version="1.1"
+ viewBox="0 0 26.856001 11.615066"
+ height="11.615067mm"
+ width="26.856001mm">
+ <defs
+ id="defs1955">
+ <linearGradient
+ id="linearGradient3276">
+ <stop
+ id="stop3278"
+ offset="0"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ id="stop3280"
+ offset="1"
+ style="stop-color:#939393;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3296">
+ <stop
+ style="stop-color:#d6d6d6;stop-opacity:1;"
+ offset="0"
+ id="stop3298" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1;"
+ offset="1"
+ id="stop3300" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3248">
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1;"
+ offset="0"
+ id="stop3250" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1;"
+ offset="1"
+ id="stop3252" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient1165">
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="0"
+ id="stop1161" />
+ <stop
+ style="stop-color:#c1c1c1;stop-opacity:1"
+ offset="1"
+ id="stop1163" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-1.4723306,-97.978267)"
+ y2="219.35825"
+ x2="533.71136"
+ y1="154.2484"
+ x1="533.71136"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient8176"
+ xlink:href="#linearGradient8190" />
+ <linearGradient
+ id="linearGradient8190">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0"
+ id="stop8186" />
+ <stop
+ style="stop-color:#f1f1f1;stop-opacity:1"
+ offset="1"
+ id="stop8188" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata1958">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-7.8233376,-183.60964)"
+ id="layer1">
+ <g
+ transform="matrix(0.13194458,0,0,0.13194458,-49.256898,177.256)"
+ id="g8497">
+ <path
+ d="M 437.26186,48.153839 H 622.6635 c 2.57843,0 4.65421,2.07578 4.65421,4.65421 V 112.27227 H 432.67106 l -0.0634,-59.464221 c -0.003,-2.57843 2.07577,-4.65421 4.6542,-4.65421 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.07946;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path8158" />
+ <rect
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect8160"
+ width="174.91151"
+ height="11.497757"
+ x="446.45923"
+ y="124.64703"
+ rx="0"
+ ry="0" />
+ <path
+ d="m 613.44466,54.606459 h 22.70299 l 2e-5,57.714271 h -22.70301 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.562353;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path8162" />
+ <path
+ id="path8164"
+ d="m 618.76322,110.41343 17.38445,1.9073 -2e-5,16.8501 c -0.009,4.35818 -3.47345,6.86209 -7.05514,7.0129 l -7.72176,-0.0389 -8.52199,-19.90136 z"
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 444.66904,110.24444 -11.99798,2.02783 -0.0634,16.89856 c 0.009,4.35818 3.47346,6.86209 7.05515,7.0129 l 7.70997,-0.0845 2.70377,-19.77131 z"
+ id="path8166" />
+ <path
+ style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.501862;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 621.56976,59.386089 14.57789,-4.77963 c -0.5791,-4.59526 -3.73214,-6.23962 -8.12538,-6.33301 -1.12844,-0.024 -2.05615,-0.0888 -3.25316,-0.10917 -1.19701,-0.0204 -3.92813,-0.002 -3.92813,-0.002 -2.75412,0.53934 -4.90998,2.11709 -6.41705,4.70431 z"
+ id="path8168" />
+ <rect
+ x="445.15765"
+ y="53.461731"
+ width="178.86"
+ height="71.042999"
+ ry="5.3895001"
+ style="fill:#f8f8f8;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8176);stroke-opacity:1"
+ id="rect8170" />
+ <path
+ d="m 456.84767,90.863729 h 13.649 v 15.527001 c 5.68733,0 11.37467,0 17.062,0 V 90.850729 h 13.65 l -22.181,-18.94184 z"
+ style="fill:none;fill-opacity:1;stroke:#e5e5e5;stroke-width:4.2922;stroke-opacity:1"
+ id="path8172" />
+ </g>
+ </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/EventFrame.java
+package com.whitemagicsoftware.kmcaster;
+
+import com.whitemagicsoftware.kmcaster.listeners.FrameDragListener;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.geom.RoundRectangle2D;
+
+class EventFrame extends JFrame {
+ private static final float ARC = 8;
+ private static final int FRAME_WIDTH = 380;
+ private static final int FRAME_HEIGHT = 60;
+
+ public EventFrame() {
+ setUndecorated( true );
+ setAlwaysOnTop( true );
+ setBackground( new Color( .2f, .2f, .2f, 0.5f ) );
+
+ setLocationRelativeTo( null );
+ setSize( FRAME_WIDTH, FRAME_HEIGHT );
+ setShape( new RoundRectangle2D.Double(
+ 0, 0, getWidth(), getHeight(), ARC, ARC ) );
+
+ final var frameDragListener = new FrameDragListener( this );
+ addMouseListener( frameDragListener );
+ addMouseMotionListener( frameDragListener );
+ }
+}
src/main/com/whitemagicsoftware/kmcaster/KmCaster.java
package com.whitemagicsoftware.kmcaster;
+import com.whitemagicsoftware.kmcaster.listeners.KeyboardListener;
+import com.whitemagicsoftware.kmcaster.listeners.MouseListener;
import org.jnativehook.GlobalScreen;
-import org.jnativehook.mouse.NativeMouseEvent;
-import org.jnativehook.mouse.NativeMouseInputListener;
import javax.swing.*;
-import java.awt.*;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.geom.RoundRectangle2D;
import java.util.logging.Level;
*/
@SuppressWarnings("unused")
-public class KmCaster {
- private static final float ARC = 8;
- private static final int FRAME_WIDTH = 380;
- private static final int FRAME_HEIGHT = 60;
-
- public static class MouseListener implements NativeMouseInputListener {
- public void nativeMouseClicked( NativeMouseEvent e ) {
-// System.out.println( "Mouse Clicked: " + e.getClickCount() );
- }
-
- public void nativeMousePressed( NativeMouseEvent e ) {
-// System.out.println( "Mouse Pressed: " + e.getButton() );
- }
-
- public void nativeMouseReleased( NativeMouseEvent e ) {
-// System.out.println( "Mouse Released: " + e.getButton() );
- }
-
- public void nativeMouseMoved( NativeMouseEvent e ) {
-// System.out.println( "Mouse Moved: " + e.getX() + ", " + e.getY() );
- }
-
- public void nativeMouseDragged( NativeMouseEvent e ) {
-// System.out.println( "Mouse Dragged: " + e.getX() + ", " + e.getY() );
- }
- }
-
- public static class FrameDragListener extends MouseAdapter {
- private final JFrame mFrame;
- private Point mInitCoordinates;
-
- public FrameDragListener( final JFrame frame ) {
- mFrame = frame;
- }
-
- public void mouseReleased( final MouseEvent e ) {
- mInitCoordinates = null;
- }
-
- public void mousePressed( final MouseEvent e ) {
- mInitCoordinates = e.getPoint();
- }
-
- public void mouseDragged( final MouseEvent e ) {
- final Point dragCoordinates = e.getLocationOnScreen();
- mFrame.setLocation( dragCoordinates.x - mInitCoordinates.x,
- dragCoordinates.y - mInitCoordinates.y );
- }
- }
-
- private static class EventFrame extends JFrame {
- public EventFrame() {
- setUndecorated( true );
- setAlwaysOnTop( true );
- setBackground( new Color( .2f, .2f, .2f, 0.5f ) );
-
- setLocationRelativeTo( null );
- setSize( FRAME_WIDTH, FRAME_HEIGHT );
- setShape( new RoundRectangle2D.Double(
- 0, 0, getWidth(), getHeight(), ARC, ARC ) );
-
- FrameDragListener frameDragListener = new FrameDragListener( this );
- addMouseListener( frameDragListener );
- addMouseMotionListener( frameDragListener );
- }
- }
-
- private final EventFrame mFrame = new EventFrame();
+public class KmCaster extends EventFrame {
public KmCaster() {
- final MouseListener mouseListener = new MouseListener();
-
- // Add the appropriate listeners.
- addNativeMouseListener( mouseListener );
- addNativeMouseMotionListener( mouseListener );
- }
+ final MouseListener mouseEventListener = new MouseListener();
+ addNativeMouseListener( mouseEventListener );
+ addNativeMouseMotionListener( mouseEventListener );
+ addNativeMouseWheelListener( mouseEventListener );
- public void show() {
- mFrame.setVisible( true );
+ final KeyboardListener keyboardListener = new KeyboardListener();
+ addNativeKeyListener( keyboardListener );
}
public static void main( final String[] args ) {
initNativeHook();
final var kc = new KmCaster();
- SwingUtilities.invokeLater( kc::show );
+ SwingUtilities.invokeLater( () -> kc.setVisible( true ) );
}
src/main/com/whitemagicsoftware/kmcaster/listeners/FrameDragListener.java
+package com.whitemagicsoftware.kmcaster.listeners;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+public class FrameDragListener extends MouseAdapter {
+ private final JFrame mFrame;
+ private Point mInitCoordinates;
+
+ public FrameDragListener( final JFrame frame ) {
+ mFrame = frame;
+ }
+
+ public void mouseReleased( final MouseEvent e ) {
+ mInitCoordinates = null;
+ }
+
+ public void mousePressed( final MouseEvent e ) {
+ mInitCoordinates = e.getPoint();
+ }
+
+ public void mouseDragged( final MouseEvent e ) {
+ final Point dragCoordinates = e.getLocationOnScreen();
+ mFrame.setLocation( dragCoordinates.x - mInitCoordinates.x,
+ dragCoordinates.y - mInitCoordinates.y );
+ }
+}
src/main/com/whitemagicsoftware/kmcaster/listeners/KeyboardListener.java
+package com.whitemagicsoftware.kmcaster.listeners;
+
+import org.jnativehook.keyboard.NativeKeyEvent;
+import org.jnativehook.keyboard.NativeKeyListener;
+
+import static org.jnativehook.NativeInputEvent.SHIFT_MASK;
+import static org.jnativehook.keyboard.NativeKeyEvent.getKeyText;
+
+public class KeyboardListener implements NativeKeyListener {
+ public void nativeKeyPressed( final NativeKeyEvent e ) {
+ System.out.println( "Key Pressed: " + getKeyText( e.getKeyCode() ) );
+
+ if( isShiftDown( e ) ) {
+ System.out.println( "SHIFTING" );
+ }
+ }
+
+ public void nativeKeyReleased( final NativeKeyEvent e ) {
+ System.out.println( "Key Released: " + getKeyText( e.getKeyCode() ) );
+ }
+
+ public void nativeKeyTyped( final NativeKeyEvent e ) {
+ System.out.println( "Key Typed: " + getKeyText( e.getKeyCode() ) );
+ }
+
+ private boolean isShiftDown( final NativeKeyEvent e ) {
+ return (e.getModifiers() & SHIFT_MASK) != 0;
+ }
+}
src/main/com/whitemagicsoftware/kmcaster/listeners/MouseListener.java
+package com.whitemagicsoftware.kmcaster.listeners;
+
+import org.jnativehook.mouse.NativeMouseEvent;
+import org.jnativehook.mouse.NativeMouseInputListener;
+import org.jnativehook.mouse.NativeMouseWheelEvent;
+import org.jnativehook.mouse.NativeMouseWheelListener;
+
+/**
+ * Listens for all mouse events: clicks and mouse wheel scrolls.
+ */
+public class MouseListener implements
+ NativeMouseInputListener, NativeMouseWheelListener {
+
+ public void nativeMouseClicked( NativeMouseEvent e ) {
+ System.out.println( "Mouse Clicked: " + e.getClickCount() );
+ }
+
+ public void nativeMousePressed( NativeMouseEvent e ) {
+// System.out.println( "Mouse Pressed: " + e.getButton() );
+ }
+
+ public void nativeMouseReleased( NativeMouseEvent e ) {
+// System.out.println( "Mouse Released: " + e.getButton() );
+ }
+
+ public void nativeMouseMoved( NativeMouseEvent e ) {
+// System.out.println( "Mouse Moved: " + e.getX() + ", " + e.getY() );
+ }
+
+ public void nativeMouseDragged( NativeMouseEvent e ) {
+ System.out.println( "Mouse Dragged: " + e.getX() + ", " + e.getY() );
+ }
+
+ public void nativeMouseWheelMoved( NativeMouseWheelEvent e ) {
+ System.out.println( "Mouse Scroll: " + e.getWheelRotation() );
+ }
+}
Delta 1226 lines added, 93 lines removed, 1133-line increase