How can I map URLs to Keybar buttons or physical keys

Version 1

    Verified Product Versions

    Wavelink Naurtech CETerm 5.7


    You can associate URLs with KeyBar buttons or physical keys in one of two ways.

    Map a Key to a UserText IDA code

    A second method to map keys to a URL is by specifying these within CETerm "User Text" strings and then bind the keys or KeyBar buttons to the User Text. Here are the steps to map F1 key to URL http://Myserver.com/Mypage.htm

    • Go to Session -> Configure -> Options -> Configure Keybars and Keys -> UserText
    • Highlight a UserText "slot" and select the Edit button
    • Enter the text \IDA_URL\http://Myserver.com/Mypage.htm\r. Make sure you include the \IDA_URL\ prefix and \r terminator
    • Go to the "Edit Keymap" tab
    • Select "HTML Keymap" from the Keymap dropdown selection
    • Tap the "New" button to create a new key remap binding (association)
    • Select the Key you want to remap. If you do not know the key, you can press the "Trap" button followed by the key and CETerm will trap the VK code for the key.
    • In the "Action" dropdown, select "Text n" where "n" is the slot number of the User Text
    • Hit OK all the way out

    Using a Meta tag in a Web Page

    The simplest way to assign a key to a URL is using a META tag in the web page itself. Here is a HTML snippet that maps function key F1 to URL http://Myserver.com/Mypage.htm.

    <meta http-equiv="OnKey0x70" content="http://Myserver.com/Mypage.htm"><! F1>

    For remapping different keys, you can change the hex value in "OnKey0x70" to that of the physical key that you wish to remap. You can also change the key name "F1" to correctly reflect the key being remapped.

    It is important to know that the OnKey META tag acts as a “hotkey” and it will activate the action even if the focus is in a text input element. If you assign an action to a normal key such as ‘1’ then you will be unable to enter the ‘1’ as a character anywhere on the page. Techniques are available to ignore the hotkey action within text input elements.

    A modified version of the above approach associates a key with a JavaScript method. This method is called when the key is pressed. You can then navigate to a pre-specified URL in the JavaScript method.

    <meta http-equiv="OnKey0x70" content="Javascript:onF1key();"><! F1>

    ...

    ...

    <script language=javascript>

    function onF1key()

    {

    // Clear entry

     

    document.form[0].barcode.value = “”;

    }

    <\script>