Home :: Tutorials :: SVG :: Events

Keydown Event

<rect width="100%" height="100%" fill="blue"
    onkeydown="press(evt)"/>
<text id="text" x="25" y="27" text-anchor="middle">0</text>

Keyup Event

<rect width="100%" height="100%" fill="blue"
    onkeyup="press(evt)"/>
<text id="text" x="25" y="27" text-anchor="middle">0</text>

Keypress Event

<rect width="100%" height="100%" fill="blue"
    onkeypress="press(evt)"/>
<text id="text" x="25" y="27" text-anchor="middle">0</text>