Jump to content



Photo
- - - - -

Pinscape Pico: button, turn off autorepeat?


  • Please log in to reply
6 replies to this topic

#1 zag

zag

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Switzerland

  • Favorite Pinball: HS

Posted 24 August 2026 - 06:39 PM

Is there a way to stop autorepeat if a button is pressed and hold? I haven't found an option in the JSON docs. Only for IR and macro. 


Edited by zag, 24 August 2026 - 06:41 PM.


#2 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 24 August 2026 - 07:38 PM

What action do you have assigned for the button?  For keyboard and joystick actions, it's not really possible to have an auto-repeat option on the device side, because auto-repeat for those is handled purely on the host (Windows) side.  This isn't a Pinscape thing, it's just the way USB defines the standard keyboard and gamepad interfaces.  At the USB level, keyboard keys and joystick buttons can only be UP (not pressed) or DOWN (pressed), so auto-repeat isn't even a concept there.  All of the auto-repeat behavior for keyboard keys and gamepad buttons is handled either in the Windows keyboard subsystems or at the application level.

 

If you can describe the specific problem you're trying to solve, I might be able to offer some other way to approach it.



#3 zag

zag

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Switzerland

  • Favorite Pinball: HS

Posted 25 August 2026 - 11:08 AM

Thank you for the answer. I came to the same conclusion last night. Pinscape sees only button pressed or not. The PC software decides what to do with it.

 

I wanted to use the coin button as a shift button and wanted to prevent repeating insering a coin, but I was wrong again. Visual Pinball just insert one coin as long as the button is pressed.



#4 Suikazz

Suikazz

    Enthusiast

  • Members
  • PipPipPip
  • 142 posts

  • Flag: Hungary

  • Favorite Pinball: GoT

Posted 25 August 2026 - 11:39 AM

Thank you for the answer. I came to the same conclusion last night. Pinscape sees only button pressed or not. The PC software decides what to do with it.

 

I wanted to use the coin button as a shift button and wanted to prevent repeating insering a coin, but I was wrong again. Visual Pinball just insert one coin as long as the button is pressed.

Ah, that makes sense.

If you want to have a button act as shift button at the same time you'll need to configure it different.
 

my use case is the start button as shift, the procedure is still the same:

        {
	    type: "shift", shiftBits: 0b1,
            source: { type: "74hc165", chip: 0, port: "H", debounceTimeOff: 10000, debounceTimeOn: 10000, lowPassFilterRiseTime: 50, lowPassFilterFallTime: 50 },
            action: { type: "key", key: "1" },
	    tPulse: "100",
        },

My left Magnasave Button also acts as F12 Button,
the matching code for the secondary function would then look like this:

 {
            source: { type: "74hc165", chip: 0, port: "B" },  
            action: { type: "key", key: "F12" },
	    shiftMask: 0b1,
	    shiftBits: 0b1,
 },


#5 zag

zag

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Switzerland

  • Favorite Pinball: HS

Posted 25 August 2026 - 04:32 PM

My shift configuration looks pretty much the same, but without debounceTimeOff, debounceTimeOff, lowPassFilterRiseTime, lowPassFilterRiseTime . I'll try those optional parameters. Thank you.



#6 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 25 August 2026 - 08:08 PM

I see.  If you're using the Coin button as a Shift button, the "SHIFT OR" functionality is probably what you want, so that it entirely skips the Coin command when you're using it as a shift button.  That should entirely eliminate the auto-repeat issue since the Coin command won't even be sent a single time, let alone repeat.  All you need to do to enable the SHIFT OR mode is to include the tPulse property on the Coin button.  That should make it entirely skip the Coin command any time you press Coin + any button with a shifted function, and only send a single timed Coin command pulse when you press and release the Coin button without pressing another button with a shifted function at the same time.



#7 zag

zag

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Switzerland

  • Favorite Pinball: HS

Posted 26 August 2026 - 04:35 PM

Great, does exactly what I wanted. Thanks!

 

shift button alone: pressed: nothing, released: 5

shift + ESC button: pressed: 3, released: nothing

         {                                             // SHIFT button (and coin button)
         type: "shift", shiftBits: 01, tPulse: 100,    // tPulse means SHIFT-OR
             source: { type: "gpio", gp: 5},           
             action: { type: "key", key: "5"},         // coin key
         }, 


         {                                             // ESC button pressed without shift button
         shiftMask: 01,
         shiftBits: 0,
             source: { type: "gpio", gp: 6 },      
             action: { type: "key", key: "esc" },     // ESC key
         },     
         {                                            // ESC button and shift button pressed
         shiftMask: 01,
         shiftBits: 01,
             source: { type: "gpio", gp: 6 },
             action: { type: "key", key: "3" },       //  3 key
         }, 

Edited by zag, 26 August 2026 - 04:48 PM.