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

Related Questions

I have an interface that I have defined in C++ which now needs to
I have a Java project that needs a addon interface. I was thinking about
If I have a class that needs to implement an interface but one or
When you have a domain object that needs to display as an interface control,
We have a tab based application that needs to support the ability for a
I have similar methods that needs to be implemented for different concepts. But call
I have a Qt-based windows application written in C++ that needs to report it's
I have the following VB.net interface that I need to port to C#. C#
I have a interface that defines some methods with attributes. These attributes need to
I have two basic interface-related concepts that I need to have a better understanding

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.