keyboard repeat dreadful in TCMD

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Keyboard repeat is dreadful in RC2. If, on a command line, I hold down, say,
the most I can get out of it is about 16 cps (should be 30) and the extra ones pile up in the buffer and occur long after I release the key.​
 
#2
On Fri, 23 Oct 2009 16:40:07 -0500, vefatica <> wrote:

|Keyboard repeat is dreadful in RC2. If, on a command line, I hold down, say,
the most I can get out of it is about 16 cps (should be 30) and the extra ones pile up in the buffer and occur long after I release the key.

No such problem with TCMD v10.
--
- Vince​
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#3
> Keyboard repeat is dreadful in RC2. If, on a command line, I hold
> down, say,
the most I can get out of it is about 16 cps (should
> be 30) and the extra ones pile up in the buffer and occur long after I
> release the key.


Not reproducible here. (Again, nothing has changed there in at least a
couple of years.)

Rex Conn
JP Software​
 
#4
On Fri, 23 Oct 2009 19:33:10 -0500, rconn <> wrote:

|---Quote---
|> Keyboard repeat is dreadful in RC2. If, on a command line, I hold
|> down, say,
the most I can get out of it is about 16 cps (should
|> be 30) and the extra ones pile up in the buffer and occur long after I
|> release the key.
|---End Quote---
|Not reproducible here. (Again, nothing has changed there in at least a
|couple of years.)

I can start v10 and v11 right next to each other; the difference is clear.

In v10 I get 29 cps and achoing stops as soon as I release the key.

In v11 I get about half that speed with the other half of the characters
appearing after I release the key.
--
- Vince​
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#5
> |---Quote---
> |> Keyboard repeat is dreadful in RC2. If, on a command line, I hold
> |> down, say,
the most I can get out of it is about 16 cps
> (should
> |> be 30) and the extra ones pile up in the buffer and occur long after
> I
> |> release the key.
> |---End Quote---
> |Not reproducible here. (Again, nothing has changed there in at least
> a
> |couple of years.)
>
> I can start v10 and v11 right next to each other; the difference is
> clear.
>
> In v10 I get 29 cps and achoing stops as soon as I release the key.
>
> In v11 I get about half that speed with the other half of the
> characters appearing after I release the key.


They're both exactly the same here.

Are you doing this from a TCMD tab window or a standalone TCC?

Anybody else able to reproduce this?​
 
#6
On Fri, 23 Oct 2009 21:25:14 -0500, rconn <> wrote:

|> I can start v10 and v11 right next to each other; the difference is
|> clear.
|>
|> In v10 I get 29 cps and achoing stops as soon as I release the key.
|>
|> In v11 I get about half that speed with the other half of the
|> characters appearing after I release the key.

|They're both exactly the same here.
|
|Are you doing this from a TCMD tab window or a standalone TCC?
|
|Anybody else able to reproduce this?

In TCMD (TCC's OK).
--
- Vince
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#8
On Fri, 23 Oct 2009 21:25:14 -0500, rconn <> wrote:

|> I can start v10 and v11 right next to each other; the difference is
|> clear.
|>
|> In v10 I get 29 cps and achoing stops as soon as I release the key.
|>
|> In v11 I get about half that speed with the other half of the
|> characters appearing after I release the key.

|They're both exactly the same here.
|
|Are you doing this from a TCMD tab window or a standalone TCC?
|
|Anybody else able to reproduce this?

In TCMD (TCC's OK).
--
- Vince
Did you try it without plugins?
 
#9
On Fri, 23 Oct 2009 22:31:25 -0500, rconn <> wrote:

|In TCMD (TCC's OK).
|--
|- Vince
|---End Quote---
|
|Did you try it without plugins?

It's OK without my 4CONBUF plugin (which switches buffers on Shift-Fn). Is it
that the key handler is slow or would any key handler cause a problem?
--
- Vince
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#10
> |In TCMD (TCC's OK).
> |--
> |- Vince
> |---End Quote---
> |
> |Did you try it without plugins?
>
> It's OK without my 4CONBUF plugin (which switches buffers on Shift-Fn).
> Is it
> that the key handler is slow or would any key handler cause a problem?
If it's OK with TCC then you've probably got some undesirable interaction
going on with TCMD. Key handlers are normally pretty fast unless you're
doing an awful lot of crunching before returning the key.
 
#11
On Fri, 23 Oct 2009 23:11:34 -0500, rconn <> wrote:

|---Quote---
|> |In TCMD (TCC's OK).
|> |--
|> |- Vince
|> |---End Quote---
|> |
|> |Did you try it without plugins?
|>
|> It's OK without my 4CONBUF plugin (which switches buffers on Shift-Fn).
|> Is it
|> that the key handler is slow or would any key handler cause a problem?
|---End Quote---
|If it's OK with TCC then you've probably got some undesirable interaction
|going on with TCMD. Key handlers are normally pretty fast unless you're
|doing an awful lot of crunching before returning the key.


This, inside the key handler, was the problem:

if ( QueryIsTCMD() ) // help in the status area
return 0;
// else check for key to dismiss help dlg (console)

Would QueryIsTCMD() cause an undesirable inreraction?
--
- Vince
 
#12
I had a break during my business trip to try this and was not able to
reproduce the problem. I am not using the console plugin.

Sent from Cookie's iPhone
Jim Cook

On Oct 23, 2009, at 22:25, rconn <> wrote:


> ---Quote---
>> |---Quote---
>> |> Keyboard repeat is dreadful in RC2. If, on a command line, I hold
>> |> down, say,
the most I can get out of it is about 16 cps
>> (should
>> |> be 30) and the extra ones pile up in the buffer and occur long
>> after
>> I
>> |> release the key.
>> |---End Quote---
>> |Not reproducible here. (Again, nothing has changed there in at
>> least
>> a
>> |couple of years.)
>>
>> I can start v10 and v11 right next to each other; the difference is
>> clear.
>>
>> In v10 I get 29 cps and achoing stops as soon as I release the key.
>>
>> In v11 I get about half that speed with the other half of the
>> characters appearing after I release the key.
> ---End Quote---
> They're both exactly the same here.
>
> Are you doing this from a TCMD tab window or a standalone TCC?
>
> Anybody else able to reproduce this?
>
>
>
>
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#13
> This, inside the key handler, was the problem:
>
> if ( QueryIsTCMD() ) // help in the status area
> return 0;
> // else check for key to dismiss help dlg (console)
>
> Would QueryIsTCMD() cause an undesirable inreraction?
It won't be harmful, but it'll definitely be slow. QueryIsTCMD creates a
pipe, writes some data to it & waits for TCMD to read the data and respond.
But TCMD only looks for the pipe every 30ms (for performance reasons), so
it's not a very good idea to try to beat on it every keystroke.
 

samintz

Scott Mintz
May 20, 2008
1,204
11
Solon, OH, USA
#14
Does TCC receive any notifications when a console is attached or detached
from TCMD?

Vince, I would guess that 99% of the time once someone starts a TCC
session they either run stand-alone or within TCMD. The few times they
detach the tab or attach could be addressed with a simple enhancement to
your plugin.

So, check whether attached or detached when the plugin is initialized and
save that away. Then just assume that is the status each time your
keystroke plugin runs.

You could then have an update command that re-checks and modifies your
saved status. You could even add it to one of the special post command
aliases.

-Scott

rconn <> wrote on 10/24/2009 09:07:21 AM:


> Quote:
>
> > This, inside the key handler, was the problem:
> >
> > if ( QueryIsTCMD() ) // help in the status area
> > return 0;
> > // else check for key to dismiss help dlg (console)
> >
> > Would QueryIsTCMD() cause an undesirable inreraction?
>
> It won't be harmful, but it'll definitely be slow. QueryIsTCMD creates a
> pipe, writes some data to it & waits for TCMD to read the data and
respond.

> But TCMD only looks for the pipe every 30ms (for performance reasons),
so

> it's not a very good idea to try to beat on it every keystroke.
>
>
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#15
> Does TCC receive any notifications when a console is attached or
> detached from TCMD?
TCMD does not send any notifications; however, TCC can quickly determine
whether it's hidden or not; if it's not hidden it definitely is *not* in a
tab window. (When it's detached it will be made visible.) The only
possible confusion is if some other process is running a hidden TCC console
app with plugins, which doesn't seem too likely.