Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

acet-sys-keystate with Windows 7

Has anyone tried acet-sys-keystate under Windows 7?  I found a post on-line that said for Vista and Autocad and the following code

[code]
(defun c:Go ()
  (while T
    (print (acet-sys-keystate 32))
  )
)
[/code]
"For me it returns a series of 0 or 1 (doesn't detect) and a series of -127/-128 if I call again the function with the Space key...  So it keeps the last press but doesn't update in the loop"
I'm seeing the same with Bricscad V15 and Windows 7. I'm not sure whether I'm missing something or if the function does not work with current versions of Windows.

Comments

  • Thanks, Roy.  I'll wait for the update.  It is good to be using a CAD program where things actually get fixed....
  • Dear Martin,

    I have actually also improved the behaviour for (acet-sys-keystate) ...
    however, I also encoutnered some unstable behaviour in different Windows versions (obviously,
    due to slightly different message handling).

    So the only reliable rule seems this  :
    - positive value : key is actually not pressed
    - negative value : key is actually pressed

    The "state switched" bit is more or less unstable, to do not care for 0/1 resp. -127/-128 return value.

    Many greetings !
This discussion has been closed.
Origami
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam