Jump to content
Flirc Forums

Long key press issue


DPaul

Recommended Posts

Hi,

I purchased FLIRC yesterday, installed it, it works !

Maybe what i want to do is impossible, but here it is..

1. I have flrc usb-attached to a pc with an app that listens to keyboard input. (i used profile "full keyboard")

2. I have a brand new remote from GRUNDIG, it sends the keys from 1 to zero as "D1", "D2",... fantastic!

3.The problem with the every other press does not work, is solved by recording the key twice (found that via forum)

4.BUT, a long key press, fires the same value multiple times: eg. D1, D1, D1......

5.This is a prob for me: because i did not buy 1 grundig controller, i bought 10 exactly the same. I map #1, and they all work!

6. I developed a kind of voting system, where all 10 users will press a key (1-9), and a score is calculated. Of course i need only

one press per user, and with long presses, i often have to many inputs.

??

I do not see how i can resolve this on the app side, because the remotes carry no "ID", that i can use to filter.

Any bright ideas? How can i eliminate long clicks?

thx,

Paul

 

 

Link to comment
Share on other sites

Do I understand this correctly that you want to receive multiple signals in a very short time span (or even at the same time) using only a single IR receiver? If yes, then the long press it not the only issue you're going to face.

1. There's no way to disable key repeat on the Flirc side. You would need to somehow modify the remotes so they only send a single data burst (or only a few of them). This is probably not possible without some deeper knowledge about the remote itself.

2. Standard consumer IR control schemes don't support any kind of collision detection/avoidance mechanisms. If two or more people press the button in a really short time span (not even at exact same time) then the signals can overlap each other making it impossible to receive anything correctly. It's probably not going to happen all the time but it's very probable and you'll have voting errors.

There may be some dedicated solutions out there which are using IR signalling for voting but they usually have some kind of collision detection/avoidance mechanism and probably some error correction. They for sure don't use any standard consumer IR control schemes.

Link to comment
Share on other sites

I may be able to handle the short time spans (several people in a short time),

but i cannot handle the repeated sending of the same info by somebody who presses a key for a second or two.

A normal PC numeric pad does the same thing, but people press it only for a brief moment, probably because they see an immediate response.

It may help if i find a remote that physically has "clicking keys", so you know that there is "contact".

thx,

Paul

Link to comment
Share on other sites

As Flirc simply works as a keyboard, you should be able to tune your system settings for key repeat delay and speed. As long as Flirc properly detects that the key is being hold down (and not that it is being repeatedly being pressed and released) then you can make the key repeat delay much longer in the system which should prevent multiple reports in your app (unless you do something funny with the keyboard input).

BTW, which Flirc do you have? The older (clear plastic) one? Or the new, metal one? If your Flirc doesn't detect that the key is actually being held (in opposition to being pressed and released repeatedly) then in case of older Flirc you can tune this by changing Interkey delay in the Advanced settings in Flirc GUI.

In case of the new Flirc, there's no such setting available, but it has much better long press detection. To set it up properly, when you record a key, don't just quickly press and release it, but hold it until the Flirc GUI shows info about successfully recording the key. New Flirc measures the time span between signal repeats and stores it besides the signal hash.

But you need to remember, that even if you are able to lower the chance of vote repetition caused by a key being held longer (by tuning system keyboard settings), when one person keeps the key pressed, another one won't be able to vote until no other signals are emitted from other remotes.

Also without the ability to discern different remotes you won't know if someone has voted multiple times.

You could look into getting some older and cheaper UEI remotes with JP1 interface, which you can connect to PC using some adapter cable and reprogram them in almost any way you want. You could for example program all of them to use NECx2 protocol with the same key codes but every remote could use different subdevice number, so Flirc would see the buttons as different ones. You would need then to assign the remotes to different key combinations and map these combinations in your voting software as different voters.

Link to comment
Share on other sites

OK, thanks for this info.

I do have the latest FLIRC, and i did try to long-confirm during the learning process.

The basic prob lies in the fact that people press a remote key (for the TV eg.) until they see/hear something happening.

They don't do that on a keyboard. They type like on a typewriter. One obvious solution on the app side is to make people vote in turn, but then the "anonimity"

factor gets a little compromised. (Although i can do without showing the individual result)

I will look into this JP1 thing, but that is new to me. Identifying the remote is the surest thing !

thanks,

paul

Link to comment
Share on other sites

Hi,

You pointed me in the right direction, with some additional work , what i want will be possible.!

In "accessability options" on the pc, i can stop repeats for eg. 2 seconds.

If i now add some visual "OK sign" on the screen, each time somebody voted, they will "stop pressing" the key.

The concession i have to make is that voting cannot not be random, but i will call the voters one by one.(max 10)

The advantages are bigger than this disadvantage.

Thanks,

Paul

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...