proposed keyflow model
authorschepers
Thu, 27 Mar 2008 03:20:46 +0900
changeset 50 43e263c8caa4
parent 49 d84a7294a28b
child 51 a6e1840033ed
proposed keyflow model
proposals/d3e-keyflow.svg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proposals/d3e-keyflow.svg	Thu Mar 27 03:20:46 2008 +0900
@@ -0,0 +1,268 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink"
+     width="100%" height="100%" viewBox="0 0 1700 500" 
+     version="1.1">
+
+	<title>DOM3 Events Key Event Flow Model</title>
+	<desc>schepers, 20-03-2008</desc>
+	
+	<g id="graph0" class="graph" fill="gainsboro" stroke="black" stroke-width="2" font-family="Verdana, Arial" font-size="14">
+		<defs>
+			<marker id='blackArrow' viewBox='-13 -6 15 12' markerUnits='userSpaceOnUse' refX='0' refY='0' markerWidth='15' markerHeight='30' orient='auto'>
+				<path d='M-10,-6 L0,0 -10,6 Z' stroke='none' fill='black' stroke-linejoin='round' stroke-linecap='round'/>
+			</marker>
+
+			<marker id='redArrow' viewBox='-13 -6 15 12' markerUnits='userSpaceOnUse' refX='0' refY='0' markerWidth='15' markerHeight='30' orient='auto'>
+				<path d='M-10,-6 L0,0 -10,6 Z' stroke='none' fill='red' stroke-linejoin='round' stroke-linecap='round'/>
+			</marker>
+
+			<marker id='greenArrow' viewBox='-13 -6 15 12' markerUnits='userSpaceOnUse' refX='0' refY='0' markerWidth='15' markerHeight='30' orient='auto'>
+				<path d='M-10,-6 L0,0 -10,6 Z' stroke='none' fill='lime' stroke-linejoin='round' stroke-linecap='round'/>
+			</marker>
+		</defs>	
+
+		<g id="edges" stroke='black' stroke-width="2" fill='none' stroke-linejoin='round' stroke-linecap='round'>
+			<path d='M140,60 H190' marker-end="url(#blackArrow)">
+				<title>No Key Events to Keydown</title>
+			</path>
+			<path d='M310,60 H360' marker-end="url(#blackArrow)">
+				<title>Keydown to Keypress</title>
+			</path>
+			<path d='M420,60 H625' marker-end="url(#blackArrow)">
+				<title>Keypress to Input Method Editor</title>
+			</path>
+			<path d='M755,60 H1065' stroke="lime" marker-end="url(#greenArrow)">
+				<title>Input Method Editor to Combination of Keys</title>
+			</path>
+			<path d='M1185,60 H1500' marker-end="url(#blackArrow)">
+				<title>Combination of Keys to Keyup</title>
+			</path>
+			<path d='M1560,85 V520' marker-end="url(#blackArrow)">
+				<title>Keyup to textInput</title>
+			</path>
+			<path d='M600,260 V520' stroke="lime" marker-end="url(#greenArrow)">
+				<title>Character Key to textInput</title>
+			</path>
+			<path d='M1385,420 V520' stroke="lime" marker-end="url(#greenArrow)">
+				<title>Character Key to textInput</title>
+			</path>
+			
+			<path d='M690,100 V200 Q690,220 670,220 H665' stroke="red" marker-end="url(#redArrow)">
+				<title>Input Method Editor to Character Key</title>
+			</path>
+			
+			<path d='M690,100 V200 Q690,220 710,220 H715' stroke="red" marker-end="url(#redArrow)">
+				<title>Input Method Editor to Sustained</title>
+			</path>
+			
+			<path d='M845,220 H895' stroke="lime" marker-end="url(#greenArrow)">
+				<title>Sustained to Delay</title>
+			</path>
+			
+			<path d='M780,240 V355' stroke="red" marker-end="url(#redArrow)">
+				<title>Sustained to keyup</title>
+			</path>
+
+			<path d='M1005,220 H1065' marker-end="url(#blackArrow)">
+				<title>Delay to keylongpress</title>
+			</path>
+			
+			<path d='M1185,220 H1235' marker-end="url(#blackArrow)">
+				<title>keylongpress to keypress</title>
+			</path>
+			
+			<path d='M1295,245 V360 Q1295,380 1275,380 H1270' marker-end="url(#blackArrow)">
+				<title>keypress to Sustained</title>
+			</path>
+			
+			<path d='M1295,245 V360 Q1295,380 1315,380 H1320' marker-end="url(#blackArrow)">
+				<title>keypress to Character Key</title>
+			</path>
+
+			
+			<path d='M1205,340 V255 Q1205,235 1225,235 H1235' stroke="lime" marker-end="url(#greenArrow)">
+				<title>Sustained to keypress</title>
+			</path>
+
+
+
+			<path d='M535,220 H485' stroke="red" marker-end="url(#redArrow)">
+				<title>Character Key to Modifier Key</title>
+			</path>
+
+			<path d='M355,220 H314' stroke="lime" marker-end="url(#greenArrow)">
+				<title>Modifier Key to Wait for Keys</title>
+			</path>
+
+			<path d='M250,191 V85' marker-end="url(#blackArrow)">
+				<title>Wait for Keys to keydown</title>
+			</path>
+			
+			
+			<path d='M1140,380 H840' stroke="red" marker-end="url(#redArrow)">
+				<title>Sustained to keyup</title>
+			</path>
+		</g>
+		
+		<g id="nokey" class="node" transform="translate(20,35)">
+			<title>No Key Events</title>
+			<ellipse cx='60' cy='24' rx='60' ry='25' fill="black"/>
+			<text fill="white" stroke="none" text-anchor="middle" x="60" y="22">no key <tspan fill="white" stroke="none" text-anchor="middle" x="60" y="38" font-family="Verdana, Arial">activity</tspan></text>
+		</g>
+		
+		<g id="keydownEvent" class="node" transform="translate(190,35)">
+			<title>keydown Event</title>
+			<polygon points="0,0 120,0 120,50 0,50"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">keydown</text>
+		</g>
+		
+		<g id="keypressEvent" class="node" transform="translate(360,35)">
+			<title>keypress Event</title>
+			<polygon points="0,0 120,0 120,50 0,50"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">keypress</text>
+		</g>
+		
+		
+		
+		<g id="IME" class="node" transform="translate(625,20)">
+			<title>IME Operation Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="31">input <tspan text-anchor="middle" x="65" y="45" font-family="Verdana, Arial">message</tspan> <tspan text-anchor="middle" x="65" y="60" font-family="Verdana, Arial">editor?</tspan></text>
+		</g>
+		
+		<g id="keycombo" class="node" transform="translate(1065,35)">
+			<title>Combination of Key Event</title>
+			<polygon points="0,0 290,0 290,50 0,50" fill="white" stroke-width="1"/>
+			<polygon points="4,4 286,4 286,46 4,46"/>
+			<text x="145" y="29" fill="black" stroke="none" text-anchor="middle">combination of keys</text>
+		</g>
+
+
+
+		<g id="isSustained" class="node" transform="translate(715,180)">
+			<title>Sustained Keypress Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="45">Sustained?</text>
+		</g>
+
+		<g id="isCharKey0" class="node" transform="translate(535,180)">
+			<title>Character Key Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="38">character <tspan fill="black" stroke="none" text-anchor="middle" x="65" y="54" font-family="Verdana, Arial">key?</tspan></text>
+		</g>
+		
+		<g id="textInput0" class="node" transform="translate(535,520)">
+			<title>textInput</title>
+			<polygon points="24,0 120,0 96,48 0,48"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">textInput</text>
+		</g>
+		
+
+		<g id="isModKey0" class="node" transform="translate(355,180)">
+			<title>Modifier Key Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="38">modifier <tspan fill="black" stroke="none" text-anchor="middle" x="65" y="54" font-family="Verdana, Arial">key?</tspan></text>
+		</g>
+
+	
+		<g id="wait" class="node" transform="translate(190,195)">
+			<title>Wait for More Key-Events</title>
+			<ellipse cx='60' cy='24' rx='64' ry='28' fill="white" stroke-width="1"/>
+			<ellipse cx='60' cy='24' rx='60' ry='24' />
+			<text fill="black" stroke="none" text-anchor="middle" x="60" y="22">wait for <tspan fill="black" stroke="none" text-anchor="middle" x="60" y="38" font-family="Verdana, Arial">more keys</tspan></text>
+		</g>
+
+
+
+
+		<g id="delay" class="node" transform="translate(895,195)">
+			<title>delay</title>
+			<path d='M0,0 H90 C120,0 120,48 90,48 H0 Z'/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">delay</text>
+		</g>
+
+
+
+
+		<g id="keylongpressEvent" class="node" transform="translate(1065,195)">
+			<title>keylongpress Event</title>
+			<polygon points="0,0 120,0 120,50 0,50"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">keylongpress</text>
+		</g>
+
+		<g id="keypressEvent" class="node" transform="translate(1235,195)">
+			<title>keypress Event</title>
+			<polygon points="0,0 120,0 120,50 0,50"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">keypress</text>
+		</g>
+		
+
+
+
+		<g id="isSustained" class="node" transform="translate(1140,340)">
+			<title>Sustained Keypress Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="45">Sustained?</text>
+		</g>
+
+		<g id="isCharKey0" class="node" transform="translate(1320,340)">
+			<title>Character Key Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="38">character <tspan fill="black" stroke="none" text-anchor="middle" x="65" y="54" font-family="Verdana, Arial">key?</tspan></text>
+		</g>
+		
+		<g id="textInput0" class="node" transform="translate(1320,520)">
+			<title>textInput</title>
+			<polygon points="24,0 120,0 96,48 0,48"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">textInput</text>
+		</g>
+		
+
+
+
+		<g id="keyupEvent" class="node" transform="translate(720,355)">
+			<title>keyup Event</title>
+			<polygon points="0,0 120,0 120,50 0,50"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">keyup</text>
+		</g>
+		
+		<g id="keyupEvent" class="node" transform="translate(1500,35)">
+			<title>keyup Event</title>
+			<polygon points="0,0 120,0 120,50 0,50"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">keyup</text>
+		</g>
+
+		
+		<g id="textInput0" class="node" transform="translate(1500,520)">
+			<title>textInput</title>
+			<polygon points="24,0 120,0 96,48 0,48"/>
+			<text x="60" y="29" fill="black" stroke="none" text-anchor="middle">textInput</text>
+		</g>
+
+
+		<!--
+			><g id="isModKey0" class="node" transform="translate(1500,340)">
+			<title>Modifier Key Decision</title>
+			<polygon points="65,0 130,40 65,80 0,40"/>
+			<text fill="black" stroke="none" text-anchor="middle" x="65" y="38">modifier <tspan fill="black" stroke="none" text-anchor="middle" x="65" y="54" font-family="Verdana, Arial">key?</tspan></text>
+		</g>
+	-->
+
+		
+		<g id="noIME" class="node" transform="translate(525,495)">
+			<title>textInput without IME</title>
+			<rect x="0" y="0" width="935" height="120" rx='10' ry='10' fill="none" stroke="gray" stroke-dasharray="5" stroke-linecap="round"/>
+			<text x="467.5" y="110" fill="black" stroke="none" text-anchor="middle">textInput without IME</text>
+		</g>
+		
+		<g id="repeat" class="node" transform="translate(1310,505)">
+			<title>textInput repeat property</title>
+			<rect x="0" y="0" width="140" height="90" rx='10' ry='10' fill="none" stroke="gray" stroke-dasharray="5" stroke-linecap="round"/>
+			<text x="70" y="80" fill="black" stroke="none" text-anchor="middle">repeat="true"</text>
+		</g>
+
+		
+
+	</g>
+	
+</svg>