program buffer or a keyboard buffer

program buffer or a keyboard buffer

Postby Otto » Thu Feb 05, 2015 3:18 pm

Hello,

I try to find out how I can read a keyboard buffer.

This is what I found so far. Can someone help me to with a fivewin solution.

so if there is a command line and there is a text in it and waiting for an 'enter' to be pressed in which buffer does it stay?,in a program buffer or a keyboard buffer?

It depends on the platform, but for example on a .NET console app running on Windows, if you call Console.ReadLine() while the app has focus it is going to receive the keyboard input and store it in an application level buffer. The only time it would stay at a lower level buffer is if the system is too busy to process the input in time. At this level 'buffering' is really just a semantic concept; the system is basically at rest, the input has been processed, transformed into a UTF-8 string and stored in memory waiting to be returned to your program when the enter key is detected.


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: program buffer or a keyboard buffer

Postby Antonio Linares » Sat Feb 07, 2015 2:59 am

Otto,

keyboard pressed chars will automatically arrive to the app as Windows messages, so there is no need to access the keyboard buffer.

In case that you want to check in advanced (before those messages come to you) what is there is the buffer you can use PeekMessage()

https://msdn.microsoft.com/en-us/library/windows/desktop/ms644943%28v=vs.85%29.aspx
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to EasyReport, EasyDialog and EasyPreview

Who is online

Users browsing this forum: No registered users and 5 guests