Add return key
This commit is contained in:
parent
957e116305
commit
5da7b376c9
10 changed files with 179 additions and 16 deletions
|
|
@ -47,6 +47,7 @@ const (
|
||||||
KeyEnd
|
KeyEnd
|
||||||
KeyBackSpace
|
KeyBackSpace
|
||||||
KeyDelete
|
KeyDelete
|
||||||
|
KeyReturn
|
||||||
KeyLimit
|
KeyLimit
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ const (
|
||||||
keyeventfUnicode uint32 = 0x4
|
keyeventfUnicode uint32 = 0x4
|
||||||
|
|
||||||
vkBack uint16 = 0x8
|
vkBack uint16 = 0x8
|
||||||
|
vkReturn uint16 = 0xD
|
||||||
vkEnd uint16 = 0x23
|
vkEnd uint16 = 0x23
|
||||||
vkHome uint16 = 0x24
|
vkHome uint16 = 0x24
|
||||||
vkLeft uint16 = 0x25
|
vkLeft uint16 = 0x25
|
||||||
|
|
@ -132,6 +133,8 @@ func (p *windowsBackend) KeyboardKey(key Key) error {
|
||||||
input := keybdInput{typ: inputKeyboard}
|
input := keybdInput{typ: inputKeyboard}
|
||||||
if key == KeyBackSpace {
|
if key == KeyBackSpace {
|
||||||
input.wVk = vkBack
|
input.wVk = vkBack
|
||||||
|
} else if key == KeyReturn {
|
||||||
|
input.wVk = vkReturn
|
||||||
} else if key == KeyEnd {
|
} else if key == KeyEnd {
|
||||||
input.wVk = vkEnd
|
input.wVk = vkEnd
|
||||||
} else if key == KeyHome {
|
} else if key == KeyHome {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,127 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
sodipodi:docname="U+2190 Leftwards Arrow (Kopie).svg"
|
||||||
|
width="1000"
|
||||||
|
height="1000"
|
||||||
|
viewBox="0 0 264.58333 264.58334"
|
||||||
|
version="1.1"
|
||||||
|
id="svg964"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:window-y="32"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:cy="443.69979"
|
||||||
|
inkscape:cx="850.06562"
|
||||||
|
inkscape:zoom="0.69641682"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="false"
|
||||||
|
id="namedview8"
|
||||||
|
inkscape:window-height="1011"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
guidetolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
borderopacity="1"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:bbox-paths="false"
|
||||||
|
inkscape:bbox-nodes="true">
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide815"
|
||||||
|
orientation="0,1"
|
||||||
|
position="0,52.916667" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide817"
|
||||||
|
orientation="1,0"
|
||||||
|
position="5.2916667,0" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide819"
|
||||||
|
orientation="0,1"
|
||||||
|
position="0,259.29167" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide821"
|
||||||
|
orientation="1,0"
|
||||||
|
position="259.29167,0" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide823"
|
||||||
|
orientation="1,0"
|
||||||
|
position="29.104167,0" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide825"
|
||||||
|
orientation="1,0"
|
||||||
|
position="235.47917,0" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide827"
|
||||||
|
orientation="0,1"
|
||||||
|
position="132.29167,161.39583" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:label=""
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide829"
|
||||||
|
orientation="1,0"
|
||||||
|
position="132.29167,161.39583" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs958" />
|
||||||
|
<metadata
|
||||||
|
id="metadata961">
|
||||||
|
<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 />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-32.41665)">
|
||||||
|
<path
|
||||||
|
id="path841"
|
||||||
|
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 834.86914,20 c -8.28393,8.31e-4 -14.99921,6.716069 -15,15 v 369.9375 c -8.7e-4,8.28393 -6.71607,14.99917 -15,15 H 449.74023 c -8.28393,-8.3e-4 -14.99916,-6.71607 -15,-15 V 180.20508 c 9.5e-4,-8.16436 -6.52883,-14.83045 -14.6914,-15 -3.53662,-0.0729 -6.98476,1.10514 -9.73633,3.32812 L 25.498047,488.33203 c -7.4287,6.00427 -7.4287,17.32971 0,23.33399 L 410.3125,831.46484 c 9.80844,7.92102 24.42018,0.94339 24.42773,-11.66406 V 595.06836 c 8.4e-4,-8.28393 6.71607,-14.99917 15,-15 h 515.25586 c 8.28393,-7.9e-4 14.99917,-6.71607 15,-15 L 980,35 c -8.3e-4,-8.283931 -6.71607,-14.999169 -15,-15 z"
|
||||||
|
transform="matrix(0.26458333,0,0,0.26458333,0,32.41665)"
|
||||||
|
sodipodi:nodetypes="cccccccccccccccccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.3 KiB |
|
|
@ -21,7 +21,7 @@ OS2Version: 0
|
||||||
OS2_WeightWidthSlopeOnly: 0
|
OS2_WeightWidthSlopeOnly: 0
|
||||||
OS2_UseTypoMetrics: 1
|
OS2_UseTypoMetrics: 1
|
||||||
CreationTime: 1535548659
|
CreationTime: 1535548659
|
||||||
ModificationTime: 1642970773
|
ModificationTime: 1643014100
|
||||||
PfmFamily: 17
|
PfmFamily: 17
|
||||||
TTFWeight: 400
|
TTFWeight: 400
|
||||||
TTFWidth: 5
|
TTFWidth: 5
|
||||||
|
|
@ -55,7 +55,7 @@ WinInfo: 0 35 12
|
||||||
BeginPrivate: 0
|
BeginPrivate: 0
|
||||||
EndPrivate
|
EndPrivate
|
||||||
TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144
|
TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144
|
||||||
BeginChars: 1114112 23
|
BeginChars: 1114112 24
|
||||||
|
|
||||||
StartChar: uni2328
|
StartChar: uni2328
|
||||||
Encoding: 9000 9000 0
|
Encoding: 9000 9000 0
|
||||||
|
|
@ -1037,5 +1037,36 @@ SplineSet
|
||||||
185 325 l 1
|
185 325 l 1
|
||||||
EndSplineSet
|
EndSplineSet
|
||||||
EndChar
|
EndChar
|
||||||
|
|
||||||
|
StartChar: uni2BA0
|
||||||
|
Encoding: 11168 11168 23
|
||||||
|
Width: 1024
|
||||||
|
HStem: 225 164<445 840>
|
||||||
|
VStem: 840 164<389 799>
|
||||||
|
LayerCount: 2
|
||||||
|
Fore
|
||||||
|
SplineSet
|
||||||
|
855 799 m 2
|
||||||
|
988 799 l 2
|
||||||
|
996 799 1004 791 1004 783 c 2
|
||||||
|
1004 240 l 2
|
||||||
|
1004 232 996 225 988 225 c 2
|
||||||
|
461 225 l 2
|
||||||
|
453 225 445 218 445 210 c 2
|
||||||
|
445 -20 l 2
|
||||||
|
445 -33 430 -40 420 -32 c 2
|
||||||
|
26 295 l 2
|
||||||
|
18 301 18 313 26 319 c 2
|
||||||
|
420 646 l 2
|
||||||
|
423 648 426 650 430 650 c 0
|
||||||
|
438 650 445 642 445 634 c 2
|
||||||
|
445 404 l 2
|
||||||
|
445 396 453 389 461 389 c 2
|
||||||
|
824 389 l 2
|
||||||
|
832 389 840 396 840 404 c 2
|
||||||
|
840 783 l 2
|
||||||
|
840 791 847 799 855 799 c 2
|
||||||
|
EndSplineSet
|
||||||
|
EndChar
|
||||||
EndChars
|
EndChars
|
||||||
EndSplineFont
|
EndSplineFont
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ type Keysym int32
|
||||||
const (
|
const (
|
||||||
// X11/keysymdef.h
|
// X11/keysymdef.h
|
||||||
xkBackSpace Keysym = 0xff08
|
xkBackSpace Keysym = 0xff08
|
||||||
|
xkReturn Keysym = 0xff0D
|
||||||
xkDelete Keysym = 0xffff
|
xkDelete Keysym = 0xffff
|
||||||
xkHome Keysym = 0xff50
|
xkHome Keysym = 0xff50
|
||||||
xkLeft Keysym = 0xff51
|
xkLeft Keysym = 0xff51
|
||||||
|
|
@ -68,6 +69,9 @@ func KeyToKeysym(key Key) (Keysym, error) {
|
||||||
if key == KeyBackSpace {
|
if key == KeyBackSpace {
|
||||||
return xkBackSpace, nil
|
return xkBackSpace, nil
|
||||||
}
|
}
|
||||||
|
if key == KeyReturn {
|
||||||
|
return xkReturn, nil
|
||||||
|
}
|
||||||
if key == KeyDelete {
|
if key == KeyDelete {
|
||||||
return xkDelete, nil
|
return xkDelete, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ var KEY_HOME = 13;
|
||||||
var KEY_END = 14;
|
var KEY_END = 14;
|
||||||
var KEY_BACK_SPACE = 15;
|
var KEY_BACK_SPACE = 15;
|
||||||
var KEY_DELETE = 16;
|
var KEY_DELETE = 16;
|
||||||
|
var KEY_RETURN = 17;
|
||||||
|
|
||||||
var ws;
|
var ws;
|
||||||
var pad;
|
var pad;
|
||||||
|
|
@ -403,6 +404,7 @@ window.addEventListener("load", function() {
|
||||||
{id: "volumemutebutton", key: KEY_VOLUME_MUTE},
|
{id: "volumemutebutton", key: KEY_VOLUME_MUTE},
|
||||||
{id: "volumeupbutton", key: KEY_VOLUME_UP},
|
{id: "volumeupbutton", key: KEY_VOLUME_UP},
|
||||||
{id: "backspacebutton", key: KEY_BACK_SPACE},
|
{id: "backspacebutton", key: KEY_BACK_SPACE},
|
||||||
|
{id: "returnbutton", key: KEY_RETURN},
|
||||||
{id: "deletebutton", key: KEY_DELETE},
|
{id: "deletebutton", key: KEY_DELETE},
|
||||||
{id: "homebutton", key: KEY_HOME},
|
{id: "homebutton", key: KEY_HOME},
|
||||||
{id: "endbutton", key: KEY_END},
|
{id: "endbutton", key: KEY_END},
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -51,7 +51,7 @@
|
||||||
<div class="page hidden">
|
<div class="page hidden">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button id="backspacebutton">⌫</button>
|
<button id="backspacebutton">⌫</button>
|
||||||
<button disabled></button>
|
<button id="returnbutton">⮠</button>
|
||||||
<button id="deletebutton">⌦</button>
|
<button id="deletebutton">⌦</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
|
|
|
||||||
|
|
@ -199,8 +199,3 @@ textarea {
|
||||||
width: 8rem;
|
width: 8rem;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#keys .buttons > button:disabled {
|
|
||||||
border-top: none;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue