Re: keyboard help
>I would like to know how to put a sequence of keys into the keyboard buffer
>(memory)
>For instance if I want to put the phrase "Hello, my name is Jhon" in the buffer
>when I'm going to get the keys with get_key()
all the characters will >already be there.
--- The code below, put it in an include or just in your program and then:
-- use get_key () to get a new key
-- use put_key (key) or put_key ({key, key, key}) to put a new key
-- That's it, you're welcome ...
-- Ralf N.
sequence buffer
integer bindex
function old_get_key ()
return get_key ()
end function
function get_key ()
integer char
if length(buffer) then
char = buffer[length(buffer)]
buffer = buffer[1..length(buffer)-1]
return char
else
return old_get_key ()
end if
end function
procedure put_key (object x)
buffer = x & buffer
end procedure
|
Not Categorized, Please Help
|
|