christina's Recent Forum Activity

  • I'm trying to get the keyboard plugin to detect left/right shift button presses.

    how-do-i-detect-left-shift-right-shift_t106884

    This here says it can be done in Chrome:

    http://stackoverflow.com/questions/2297 ... up-in-chro

    This test here proves that, yes, keycode is 16 for both SHIFT keys, but Javascript *can* handle location via the constant DOM_KEY_LOCATION_ which can be "standard", "left", "right" or "numpad".

    It's a javascript question, if only I knew how to modify the keyboard plugin to add this functionality:

    ( window.onkeydown = function(event)

    {

    var o = 'event = onkeydown, which = ' + event.which + ', location = ';

    switch(event.location)

    {

    case KeyboardEvent.DOM_KEY_LOCATION_STANDARD: o += 'standard'; break;

    case KeyboardEvent.DOM_KEY_LOCATION_NUMPAD: o += 'numpad'; break;

    case KeyboardEvent.DOM_KEY_LOCATION_LEFT: o += 'left'; break;

    case KeyboardEvent.DOM_KEY_LOCATION_RIGHT: o += 'right'; break;

    }

    )

    I've built the game around "A" and "right cursor key" but my testers are complaining about accessibility.

  • Ashley I wish it could be done natively., but I will request a third party plugin. Thank you

  • Ashley any luck? I only care about chrome /node webkit

    Sorry to bug you so much. Do you prefer that I make an official request?

  • Bump this one. Ashley did you have a chance to look at this? Left/Right SHIFT and CTRL would make a world of difference

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You're incredible, tx ASHLEY.

    Big disclaimer: Chrome apparently only correctly registers DOM_KEY_LOCATION on key down. Key down on left shift would return "Left", but key up on left Shift would return "standard".

  • bump: Ashley any ideas? Adding the code to the Keyboard Plugin should be trivial, no? Should I file a request?

  • spongehammer: that's the complaint. They all want to map left/right SHIFT or some other distinct Key like Left/Right CTRL. Ctrl+Shift or other combinations of keys aren't comfortable enough apparently.

  • Kyatric thank you for the quick reply.

    This test here proves that, yes, keycode is 16 for both SHIFT keys, but Javascript *can* handle location via the constant DOM_KEY_LOCATION_ which can be "standard", "left", "right" or "numpad".

    http://jsfiddle.net/ySkn8/1/

    It's a javascript question, if only I knew how to modify the keyboard plugin to add this functionality:

    ( window.onkeydown = function(event)

    {

    var o = 'event = onkeydown, which = ' + event.which + ', location = ';

    switch(event.location)

    {

    case KeyboardEvent.DOM_KEY_LOCATION_STANDARD: o += 'standard'; break;

    case KeyboardEvent.DOM_KEY_LOCATION_NUMPAD: o += 'numpad'; break;

    case KeyboardEvent.DOM_KEY_LOCATION_LEFT: o += 'left'; break;

    case KeyboardEvent.DOM_KEY_LOCATION_RIGHT: o += 'right'; break;

    }

    )

    I've built the game around "A" and "right cursor key" but my testers are complaining about accessibility.

  • Kyatric have you seen this issue crop up before? Any advice?

  • Working on a pinball game.

    The keyboard object in C2 only recognizes "Shift", not left/right shift. Left/right shift or left/right Ctrl are kinda necessary for a pinball game.

    Is this hard coded? Anyone know of a fix?

    This here says Left and Right shift keys are distinguishable.

    http://stackoverflow.com/questions/2297 ... up-in-chro

    Ashley Is there any way to make the keyboard object accept location?

  • A player for amiga tracker audio formats

    It's already in .js :

    http://www.photonstorm.com/flod

    https://github.com/photonstorm/FlodJS

    but I find it all rather arcane. Anyone who is knowledgeable enough to make it into a Construct 2 plugin?

  • It's amazing, I hearted it on LD as well <3

christina's avatar

christina

Member since 21 Aug, 2012

Twitter
christina has 3 followers

Connect with christina

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies