Next: , Up: Key User Interface


6.1 The KUI's time out options

The KUI may be configured to time out on either maps or key sequences.

When the KUI is matching a partial map or key sequence it is capable of timing out. This means it will simply accepts the keys it has received so far if a certain amount of time elapses between key presses. This is obvious when the user is typing a map because the user must press each key individually. For partial key sequences, this is less obvious. That is because the user only presses a single key, but multiple characters are sent to CGDB. The table below describes how the user can configure the KUI to time out on key codes or maps. The timeout and ttimeout options control this functionality.

timeout ttimeout action
off off do not time out
on on or off time out on maps and key codes
off on time out on key codes

It is also possible to tell the KUI how long to wait before timing out on a partial match. If timeout is on, then the KUI will wait a certain amount of time for the next character, when matching a map, before it decides a match is no longer possible. If timeout or ttimeout is on, then the KUI will wait a certain amount of time for the next character, when matching a key sequence, before it decides a match is no longer possible. The timeoutlen and ttimeoutlen options can be configured by the user to tell the KUI how long to wait before timing out. The table below describes when the KUI uses which option.

timeoutlen mapping delay key code delay
< 0 timeoutlen timeoutlen
>= 0 timeoutlen ttimeoutlen

A value of 0 means that the KUI will time out right away. It will not be possible to match a map or key code in this circumstance.

A common problem could be that when the user types a special key like the left or right arrows, CGDB will go into the source mode and not perform the action requested by the user. This typically means that the key code delay is to small. If you try setting the option set ttimeoutlen=1000 CGDB should start acting like the user expects. If not, please report this to the CGDB mailing list.