Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 114577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:52:58+00:00 2026-05-11T02:52:58+00:00

I have an interface that needs to react to long key presses. That means

  • 0

I have an interface that needs to react to ‘long key presses’. That means 2 different actions for the same key based on how long the key has been down:

PRESS LEFT CURSOR: action A

PRESS & HOLD LEFT CURSOR: action B

Well, it’s proving harder that I thought. The main problem is that both Keyboard.KEY-DOWN and Keyboard.KEY-UP fire continuously if you hold the key down. This looks weird to me although might make sense if you think about imputing text (if you are entering text and hold down a key it starts to fill the space).

When I was trying to tackle the problem I thought about starting a counter on the KEY-DOWN and resetting it on KEY-UP. Then if it reached certain threshold fire an event. The problem is the counter resets straight away because they KEY-UP event fires all the time.

I’m aware of the keyboard polling classes such as BigRoom‘s and Senocular‘s but they don’t solve the problem because they base their status on the same events.

I could go for timers starting a timer on KEY-DOWN and after x milliseconds check if the key is still down but that would assume that the key has been down all the time. I don’t think it would be reliable.

And this is the point I’m starting to run out of ideas. Is there a much simpler method I’ve overlooked? I hope there is!

Thanks,

Juan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:52:59+00:00Added an answer on May 11, 2026 at 2:52 am

    Sorry that took me so long to come back, but was on the middle of the project and really didn’t have time to look deeper into this. Now I have and I’ve found that there’s no such problem. Read below for the long answer.

    This is only hapenning under very specific circumstances and probably none to blame Adobe.

    I have an iMac running Ubuntu and develop Flash on a virtual machine running Windows XP. This problem only appears on the virtual XP, the same application running natively on Ubuntu (and probably other systems) doesn’t show the problem.

    And because I have some other keyboard quirks when using the VM, I think the problem is on VirtualBox’s keyboard driver.

    Thanks to everybody that took the time to look into this. I hope this helps for other people!

    Juan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 90k
  • Answers 90k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer routes.rb: map.edit_order "order/modify/:id" , :controller => "order" , :action =>… May 11, 2026 at 6:06 pm
  • Editorial Team
    Editorial Team added an answer SELECT slotnumber, fileid, rank FROM ( SELECT slotnumber, fileid, Schedules.rank,… May 11, 2026 at 6:06 pm
  • Editorial Team
    Editorial Team added an answer #' is shorthand for function, which returns a pointer to… May 11, 2026 at 6:05 pm

Related Questions

I'm wondering how to make a button or input field in Interface Builder react
I have a large database and want to implement a feature which would allow
Having read up on quite a few articles on Artificial Life (A subject I
I have an interface that I have defined in C++ which now needs to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.