xrile / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

cursor key > 30 times #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create menu with 32 menu items
2. press KEY_DOWN key 30 times
3. 5 second countdown starts

What is the expected output? What do you see instead?
countdown should not start

Also happens with v,^,left,right,up,down.

What version of the product are you using? On what operating system?
latest/all builds

Please provide any additional information below.

Suggest code in stage2.c
//    if (!old_c_count_end && c == old_c && (old_c_count >= 30 || (old_c_count 
>= 8 && c != KEY_DOWN /*&& c != KEY_RIGHT*/ && c != KEY_UP /*&& c != 
KEY_LEFT*/)))
      if (!old_c_count_end && c == old_c && old_c_count >= 8 && c != KEY_LEFT  && c != KEY_RIGHT  && c != KEY_DOWN  && c != KEY_UP && ((char)c) != '^' && ((char)c) != 'v')
        grub_timeout = 5;

in addition would be nice to have a debug setting to turn this off (or indeed 
turn all old dumb_terminal/vt52 features off using a grub4dos command - e.g. 
terminal disable  )

Original issue reported on code.google.com by Steve6375 on 16 Jun 2011 at 10:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
IIRC from what tinybit said, it is a "Feature" but not a "bug".

Original comment by roy...@gmail.com on 16 Jun 2011 at 11:00

GoogleCodeExporter commented 8 years ago
what is the purpose of this undocumented feature? Why does it not work for v or 
key_right or ^ ???

Original comment by Steve6375 on 16 Jun 2011 at 11:08

GoogleCodeExporter commented 8 years ago
>>> countdown should not start, Also happens with v,^,left,right,up,down.
>>> Suggest code in stage2.c ......

With your patch, you disabled the feature of the keys v,^,left,right,up,down 
for Single-Key-Selection. It may be an improvement. However it may also be a 
deterioration.

>>> what is the purpose of this undocumented feature?

In case the user only has the UP and DOWN keys(working), this feature will give 
the user a possibility to select and boot a menu item.

And not all features have to be documented(in my opinion), though it might be 
better to document it.

>>> Why does it not work for v or key_right or ^ ???

Do you mean these keys should not be used as Single-Key-Selection?

Are you sure the user never want to use these keys as a Single Key for 
selection and boot?

Any key with 8 times repeat will act as Single-Key-Selection, including the 
keys "v", key_right and "^".

>>> a debug setting to turn this off

I personally think this feature does not bring too much trouble and need not 
turn off. This is mostly a choice of taste. Let's see chenall's decision.

Original comment by tinyb...@gmail.com on 17 Jun 2011 at 2:01