Log In  


Is there a way to adjust how quickly held keys repeat keypresses within the code editor, etc? It appears Pico-8 applies its own setting/behavior to this, it does not inherit it from the host operating system. I like to use very fast key repeat settings, in general. In particular it would be nice for using page up/page down to navigate a large program.

1


1

I think you have to roll your own, using btn() (instead of btnp()) and a timer..

Here's a quick example of that:

Cart #41583 | 2017-06-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

(This will make an image appear at each keypress. If the button is held for 2 seconds, then it will start spawning images again at a rate of 6 per second until you release the key)


I mean for the editor specifically.


Yeah oops, I made a complete fail at reading comprehension there. In that case.. I don't think you can adjust that.

Alt+up/down will jump between functions and ctrl+up/down will go to the top/bottom of the document. Not what you're looking for, but maybe that will help.


It's actually not bad as is, I'm just used to having it turned all the way to max on any OS I use, for text editing. Usually programs containing text editors inherit this property from the OS somehow.


I too would like the key repeat speed to inherit the OS, or at least to be able to change it. It's too slow for now.

@enargy is right about alt+up/down to access previous/next function. So my tip to easily browse your code: sort your functions alphabetically. Plus, that's a good excuse to gather and name functions by the entities they're managing. :)


New user chiming in - I too would love for this to be fixed.

It is especially frustrating considering that character input does seem to follow the OS settings for Repeat Delay and Repeat Rate, and so does backspace ; but directional arrows seem to have their own settings overriding the OS preferences, replacing them with very sluggish values. It gets tiring very fast ...


this doesn't actually fix the issue, but you CAN use external text editors with pico-8.

I use VSCode most of the time.


Indeed yeah - I ended up settling for UltraEdit for serious sessions while on my main machine, and native Pico8 editing while on the laptop.

Still, it's a shame that keyrepeat for directional keys is currently not following the OS setting while everything else does, as that would be a net benefit for everyone. It's definitely a bug, so hopefully that'll get fixed.


I would also like the arrow keys inside the editor to use the host key repeat rate like the rest of the keys, unless there's a good reason for them not to.


2

That would be nice to change the key repeat speed in the editor.

Would it be so bad to use the default as set in your OS (Windows), ZEP ?

When I found how slow repeat was for BTNP(), I initially wrote my code for custom keystrokes. (Key1, pause) (Key2, pause) then (Fast repeat).

Here is some sample code:

-- custom key repeat example
-- from the lab of dw817

-- custom key repeat

x=58 y=58 b={}

repeat
  cls()
  circfill(x,y,16)
  flip()
  for i=0,3 do
    if btn(i)==false then
      b[i]=0
    else
      b[i]+=1
    end
    if b[i]==1 or b[i]==8 or b[i]>16 then
      if (i==0) x-=1
      if (i==1) x+=1
      if (i==2) y-=1
      if (i==3) y+=1
    end
  end
until forever

I'd love this to have configurable as well.



@merwok I had that thought too, but I think they're referring to the editing tools for which the poke doesn't seem to be effective.



[Please log in to post a comment]