The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MENU] Another action on Enter than timeout
2014-03-10, 11:39 (This post was last modified: 2014-03-10 11:46 by sebastian.)
Post: #1
[MENU] Another action on Enter than timeout
I have this menu:

clear scancount
clear completeinput
set deftimeout 0
item cancel
item --key 0 0
item --key 1 1
item --key 2 2
item --key 3 3
item --key 4 4
item --key 5 5
item --key 6 6
item --key 7 7
item --key 8 8
item --key 9 9
choose --default cancel --timeout ${deftimeout} input && goto process || goto start
iseq ${input} cancel && goto cancel || goto cproc
set deftimeout 56
set scancount ${scancount}X
set completeinput ${completeinput}${input}
iseq ${scancount} XXXXXXXXXXX && goto start || goto continue
iseq ${scancount} XXXXXXXXXX && goto step2 || goto start

currently, it works pretty well. But I want to assign Another action if the user press ENTER, than if the timeout expires.
So if the user press ENTER, I want something different happen, than if the user Waits until timeout (56 milliseconds) expires.

All menu items have shortcuts so it does not matter if the user is unable to use the Arrow keys and select a item and press enter.

I tried with assigning --key 0x0a but didnt work.
(KEY_ENTER -> LF -> CTRL_J -> 0x0a)
(eg "item --key 0x0a done")

Is this possible to tie ENTER permanently to a menu item?
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
[MENU] Another action on Enter than timeout - sebastian - 2014-03-10 11:39

User(s) browsing this thread: 1 Guest(s)