Opened 14 years ago

Closed 14 years ago

#3339 closed defect (worksforme)

single keypresses are interpreted twice

Reported by: anonymous Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: unknown
Severity: low Keywords: keystroke keypress double twice press
Cc: Ticket locked: yes


When pressing some key, arrow down in the menu for example, the selection navigates down twice. When pressing enter once it is interpreted as a double enter keypress. It seems to be the same with all the keys..

Im using just a regular keyboard.

I tried to search, but didn't find any similar report. Sorry if it's a duplicate.

Attachments (1)

doublekeypressdebug.diff (489 bytes) - added by stuartm 14 years ago.
Debug patch - Prints message to log for every keypress (!)

Download all attachments as: .zip

Change History (21)

comment:1 in reply to:  description Changed 14 years ago by kristian

Sorry, forgot to mention. I'm using the ubuntu packages found in feisty (0.20).

comment:2 Changed 14 years ago by Nick Morrott <knowledgejunkie@…>

This is most likely due to your LIRC config rather than being MythTV-related. You should look into using the 'repeat' option in your lircrc file.

You will probably see the same multi-kepress behaviour when using irw from the command line, which will confirm it is a LIRC issue.

comment:3 in reply to:  2 Changed 14 years ago by kristian

I'm not using lirc. I don't even have it installed (however I have an old lircrc, but changed all repeats to 0 which didn't help).

I'm using a regular usb keyboard... does lircrc really have something to do with the my keyboard behaviour?

comment:4 Changed 14 years ago by Nick Morrott <knowledgejunkie@…>


Apologies for not paying full attention to your report - clearly lircrc does not affect your regular keyboard. I somehow missed the mention of the regular keyboard.

Do you only see this behaviour in MythTV? Have you tried altering your keyboard's repeat rate and repeat delay using xset?


comment:5 Changed 14 years ago by kristian

Yes, I'm only experiencing this with mythtv.

And no, I haven't tried to alter the repeat rate since I'm very comfortable with the current settings (defaults).

This evening I've tried mythtv quite a lot, and recently perhaps figured out a little lead: the problem doesn't appear immediatly after mythtv startup, but it seems that it always appears right after I've entered some submenu. And then it persists until I restart mythtv.

comment:6 Changed 14 years ago by kristian

I tried to disable keyboard repeat (I did it from kde control center, but it probably does the same as xset). The navigation really works when keyboard repeat is disabled.

However, I would like to have keyboard repeat enabled. Do I have to always switch it off before launching mythtv?

comment:7 Changed 14 years ago by stuartm

Resolution: invalid
Status: newclosed

I'm going to close this as invalid.

You need to alter the repeat rate for your keyboard. We can't ignore or change the repeat rate in mythtv just because it's too fast to allow proper navigation, that would involve second guessing the user who may have chosen a higher or lower repeat rate for a reason. Likewise, disabling auto-repeat wouldn't be expected and would make scrolling through long lists impossible.

If mythtv responds twice for every keypress, that is because two events are received.

comment:8 Changed 14 years ago by kristian

Resolution: invalid
Status: closedreopened

Since no other program I have, and I have many, receives two events for every keypress, it should be obvious that it's mythtv that is doing something wrong. It does not behave as a program should behave and thus it is a bug.

Keyboard repeat should be used for different purposes than as a workaround for some implementation problems. I can mention my settings: delay 660msec, rate 25/sec. One very short keypress in mythtv results in two (never three or four) actions, where the second appears about 0,5 second later than the first. It's definitely a bug.

comment:9 Changed 14 years ago by paulh

Resolution: worksforme
Status: reopenedclosed

I can't reproduce this using your exact settings, even turning the delay right down to 100ms I'm not seeing anything out of the ordinary. If this really is a bug in Myth surely we would have 100's of people complaining about it?

We need some concrete proof that this really is a genuine bug and not just some local problem at your end and since none of the devs seem to be able to reproduce it you are going to have to do some digging on your own.

I'd start by adding some debug statements in the eventfilter in MythMainWindow? to see if it *is* receiving two events for each key press. If it is then as Stuart has already said Myth is doing the right thing and you need to look at your setup. If it receives one key press but somehow Myth is seeing that as two then you need to figure out how that is happening and let us know so we can try to fix it.

comment:10 Changed 14 years ago by kristian

I know, the behaviour is not reproduced for everybody. I have also installed mythtv successfully on other computers. However, the problem is a fact for me.

I'm sorry, but I don't have enough time to spend to enter that deep into mythtv development, needed to compile the stuff from source with debug statements.

Let's say it ain't a mythtv bug. Any other (easy) test suggestions? I'm using a quite regular kubuntu setup. As said, I haven't experienced similar behaviour in any other application.

Perhaps the loaded kernel modules might give a hint?

Module                  Size  Used by
eeprom                  8336  0
w83627hf               26256  0
hwmon_vid               4224  1 w83627hf
i2c_dev                 8708  0
cx22702                 7300  1
cx88_dvb               16644  1
cx88_vp3054_i2c         5376  1 cx88_dvb
video_buf_dvb           7684  1 cx88_dvb
dvb_ttpci             102084  0
saa7146_vv             50048  1 dvb_ttpci
saa7146                19720  2 dvb_ttpci,saa7146_vv
ttpci_eeprom            3456  1 dvb_ttpci
binfmt_misc            12680  1
rfcomm                 40856  6
l2cap                  25728  5 rfcomm
ipv6                  268704  16
nls_iso8859_1           5120  1
isofs                  36284  0
udf                    85252  0
ppdev                  10116  0
lp                     12452  0
cpufreq_userspace       5408  0
cpufreq_stats           7360  0
cpufreq_powersave       2688  0
cpufreq_ondemand        9228  0
freq_table              5792  2 cpufreq_stats,cpufreq_ondemand
cpufreq_conservative     8200  0
tc1100_wmi              8068  0
pcc_acpi               13184  0
dev_acpi               12292  0
sony_acpi               6284  0
video                  16388  0
sbs                    15652  0
i2c_ec                  5888  1 sbs
dock                   10268  0
button                  8720  0
battery                10756  0
container               5248  0
ac                      6020  0
asus_acpi              17308  0
backlight               7040  1 asus_acpi
af_packet              23816  2
vfat                   14208  1
fat                    53916  1 vfat
nls_cp437               6784  2
ntfs                  107764  1
dm_snapshot            18852  0
dm_mirror              23188  0
dm_mod                 59084  2 dm_snapshot,dm_mirror
fuse                   46612  1
i2c_isa                 6272  1 w83627hf
joydev                 10816  0
snd_mpu401              9256  0
snd_mpu401_uart         9472  1 snd_mpu401
snd_intel8x0           34204  4
snd_ac97_codec         98336  1 snd_intel8x0
ac97_bus                3200  1 snd_ac97_codec
snd_pcm_oss            44544  0
stv0299                11528  1
snd_pcm                79876  4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_mixer_oss          17408  1 snd_pcm_oss
snd_seq_dummy           4740  0
tuner                  61864  0
saa7115                16400  0
msp3400                31648  0
parport_pc             36388  1
snd_seq_oss            32896  0
analog                 12832  0
gameport               16520  1 analog
ide_cd                 32672  0
cdrom                  37664  1 ide_cd
usbhid                 26592  0
hid                    27392  1 usbhid
wacom                  17024  0
b2c2_flexcop_pci        9368  1
b2c2_flexcop           28812  1 b2c2_flexcop_pci
pvrusb2               139220  0
parport                36936  3 ppdev,lp,parport_pc
pcspkr                  4224  0
cx8802                 19332  1 cx88_dvb
dvb_core               80808  4 video_buf_dvb,dvb_ttpci,stv0299,b2c2_flexcop
cx2341x                12804  1 pvrusb2
cx8800                 35212  0
cx88xx                 67364  3 cx88_dvb,cx8802,cx8800
compat_ioctl32          2304  1 cx8800
ir_common              31236  1 cx88xx
i2c_algo_bit            8712  2 cx88_vp3054_i2c,cx88xx
btcx_risc               5896  3 cx8802,cx8800,cx88xx
video_buf              26116  6 cx88_dvb,video_buf_dvb,saa7146_vv,cx8802,cx8800,cx88xx
dvb_pll                15364  3 cx88_dvb,b2c2_flexcop
videodev               28160  4 saa7146_vv,pvrusb2,cx8800,cx88xx
v4l2_common            25216  8 saa7146_vv,tuner,saa7115,msp3400,pvrusb2,cx2341x,cx8800,videodev
v4l1_compat            15236  4 saa7146_vv,pvrusb2,cx8800,videodev
tveeprom               15888  2 pvrusb2,cx88xx
snd_seq_midi            9600  0
snd_rawmidi            25472  2 snd_mpu401_uart,snd_seq_midi
hci_usb                18204  6
bluetooth              55908  15 rfcomm,l2cap,hci_usb
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
snd_seq                52592  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              23684  3 snd_pcm,snd_seq
snd_seq_device          9100  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
k8temp                  6656  0
snd                    54020  18 snd_mpu401,snd_mpu401_uart,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_seq_oss,snd
soundcore               8672  1 snd
snd_page_alloc         10888  2 snd_intel8x0,snd_pcm
amd64_agp              13700  1
agpgart                35400  1 amd64_agp
shpchp                 34324  0
pci_hotplug            32576  1 shpchp
i2c_nforce2             6784  0
i2c_core               22784  21 eeprom,w83627hf,i2c_dev,cx22702,cx88_dvb,cx88_vp3054_i2c,dvb_ttpci,ttpci_eeprom,i2c_ec,i2c_isa,stv0299,t
evdev                  11008  5
tsdev                   8768  0
usb_storage            72256  1
ext3                  133128  3
jbd                    59816  1 ext3
mbcache                 9604  1 ext3
libusual               17936  1 usb_storage
sg                     36252  0
sd_mod                 23428  9
sata_nv                20868  5
ata_generic             9092  0
floppy                 59524  0
sata_sil               12808  0
libata                125720  3 sata_nv,ata_generic,sata_sil
scsi_mod              142348  4 usb_storage,sg,sd_mod,libata
amd74xx                15260  0 [permanent]
generic                 5124  0 [permanent]
forcedeth              46728  0
ehci_hcd               34188  0
ohci_hcd               22532  0
usbcore               134280  9 usbhid,wacom,pvrusb2,hci_usb,usb_storage,libusual,ehci_hcd,ohci_hcd
thermal                14856  0
processor              31048  1 thermal
fan                     5636  0
fbcon                  42656  0
tileblit                3584  1 fbcon
font                    9216  1 fbcon
bitblit                 6912  1 fbcon
softcursor              3200  1 bitblit
vesafb                  9220  0
capability              5896  0
commoncap               8192  1 capability

comment:11 Changed 14 years ago by sphery <mtdean@…>

Please post to the -users list for discussion ( ). Many more people will be likely to see the issue (and provide input) if you do so.

comment:12 Changed 14 years ago by anonymous

For lirc, you can run 'irw', then press a key on the remote. You should see the key first with a number '0', then with increasing numbers for the repeats.

Usually, the repeats will be too fast for what you want, but that's simply what the remote sends.

You can reduce the repeat rate at which keys are sent to mythtv, and also set an initial delay by using the 'delay' and 'repeat' options in the .mythtv/lircrc file for the definitions for each key where you want that. Below is an example for what I use for the key '8', and it gives me a very comfortable initial delay and repeat:

    prog = mythtv
    button = 8
    config = 8
    delay  = 2
    repeat = 1

comment:13 Changed 14 years ago by anonymous

If it's from a keyboard, check your XFree86.conf or xorg.conf: It's possible to get double keypresses if you misconfigured your X server to have two keyboard inputs, each pointing to the same hardware (but using different drivers/modes/configurations)...

comment:14 Changed 14 years ago by kristoffer@…

Resolution: worksforme
Status: closedreopened

I'm seeing this as well. :(

The troubles began after a dist-upgrade on my Debian Unstable system that brought in a whole bunch of new packages, including the "latest" mythtv 0.20-svn20070417-0.0. (I hadn't been upgrading the last three months or so..)

The problem description is that the user interface works just fine until one enters the Watch Recordings menu. In there, pressing right to choose a program has the effect of two right-presses; it brings up the menu where one may play, add this episode to playlist ... delete the episode. Which isn't what you want. Pressing Escape brings you back to program selection - it is virtually impossible to get to the state of selecting an episode.

There's is a workaround though. If you choose to play the first episode and escape out of that view brings you in the position where an episode may be chosen. However you better hope it's on an odd row - because up/down jumps two episodes! Note that there's a time-delay of the second press of about 500msecs or maybe longer. Effectively, it seems that you have selected the right episode for half a second, which might trigger you to press enter. Sadly, the double press is processed first.

I've checked the suggestion of incorrectly configured xorg.conf, but that seems OK. I've got no lirc running (this is with an USB connected wireless keyboard).

Thank you for any suggestions.


comment:15 Changed 14 years ago by stuartm

Priority: majorminor
Severity: highlow

Changed 14 years ago by stuartm

Attachment: doublekeypressdebug.diff added

Debug patch - Prints message to log for every keypress (!)

comment:16 Changed 14 years ago by stuartm

Resolution: invalid
Status: reopenedclosed

I've attached a very simple debugging patch which you can use to see how many keypresses are actually received by mythtv. It will log every time a keypress is received from X.

If after trying the patch you still think there is a problem in mythtv, then reopen the ticket and I'll provide a more detailed debugging patch to identify the issue.

comment:17 in reply to:  14 Changed 14 years ago by iang

Resolution: invalid
Status: closedreopened

Replying to

I'm seeing this as well. :(

The troubles began after a dist-upgrade on my Debian Unstable system that brought in a whole bunch of new packages, including the "latest" mythtv 0.20-svn20070417-0.0. (I hadn't been upgrading the last three months or so..)

It's also happening to me, also right after upgrading debian unstable (sid). I've got a thread on mythtv-dev about it now.

comment:18 Changed 14 years ago by wonky_widget

I've just installed 0.20.2 on opensuse for a backend/frontend, and upgraded my old knoppmyth frontend to the latest version. BOTH the mythtv frontend on Opensuse -and- the frontend on knoppmyth exhibit the same "stuck key" problem, probably 25% of the time when watching playback of recordings. They start repeating the keystoke until you hit another key, then it stops.

The knoppmyth frontend has not changed hardware in any way from the previous (2 year old) knoppmyth install.

comment:19 Changed 14 years ago by deadfish19

I'm in the same boat as wonky_widget; the problem description fits exactly what I'm experiencing. I upgraded my mythtv installation to 0.20.2 for the SchedulesDirect? functionality, and my wired keyboard keypresses are sometimes (roughly 1 in 4) interpreted as a "stuck key", causing the cursor to scroll wildly or dive deeply through menus. I would be happy to provide any logs requested.

comment:20 Changed 14 years ago by stuartm

Resolution: worksforme
Status: reopenedclosed
Ticket locked: set
Note: See TracTickets for help on using tickets.