[CLOSED] Get keycode

  1. #1

    [CLOSED] Get keycode

    Is there any Ext.Net ready function i can use to retrieve the keycode of the pressed key on keypress handler which will work in any browser?
  2. #2
    Hello!

    What about this?
    http://dev.sencha.com/deploy/dev/doc...&member=getKey

    It should work under all browsers which are officially supported.

    Within an event handler you could use just e.getKey().

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:TextField runat="server" EnableKeyEvents="true">
            <Listeners>
                <KeyUp Handler="alert(e.getKey())"/>
            </Listeners>
        </ext:TextField>
        </form>
    </body>
    </html>
    Last edited by Daniil; Sep 16, 2010 at 3:00 PM.

Posting Permissions