[JIRA] Created: (VWR-16226) llTakeControls() reacts differently to arrow keys than it does the WASD keys.

Adeon Writer (JIRA) no-reply at lindenlab.cascadeo.com
Sat Nov 28 11:23:01 PST 2009


llTakeControls() reacts differently to arrow keys than it does the WASD keys.
-----------------------------------------------------------------------------

                 Key: VWR-16226
                 URL: http://jira.secondlife.com/browse/VWR-16226
             Project: 1. Second Life Viewer - VWR
          Issue Type: Bug
          Components: Scripting, User Interface
    Affects Versions: 1.23
         Environment: Windows Vista, USB Keyboard
            Reporter: Adeon Writer


There is a difference in how keypresses on the WASD keys are handled than that of the arrow keys, and this negatively impacts scripts using llTakeControls(). See code below:

{code}
integer controls;

default
{
    state_entry()
    {
        controls = CONTROL_FWD | CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT;
        llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
    }

    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_TAKE_CONTROLS)
        {
            llTakeControls(controls, TRUE, TRUE);
        }
    }
    
    control(key id, integer level, integer edge)
    {
        if((level & edge & controls) == controls)
        {
            llOwnerSay("You pressed forward, left, and right at the same time.");
        }
    }
}{code}

The following code would be expected to generate the object saying a message whenever the up, left, and right arrow keys are pressed at the same time (or, alternatively, the W, A, and D keys)
Additionally it would be expected to react the same to WASD input as it would arrow key input.

However you will find that you can generate the message using the WASD keys (provided you remember to minimize the chat bar) however it is not generated by arrow key input.
Expected behavior would be that the arrow keys function identically to the WASD keys

This button combination is used for various vehicle and combat systems, and because of that, users are forced to use the WASD keys since scripts do not seem to be able to read this combination from the arrow keys. This could be a problem in the viewer or the server, somewhere along the line, the arrowkey presses aren't being handled properly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.secondlife.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the Jira-notify mailing list