Re: gpm mouse support for linux

new topic     » goto parent     » topic index » view thread      » older message » newer message

It seems to be very simple in fact:

include std/get.e 
include std/io.e 
 
integer mousefp 
integer mousedata, knt 
 
  mousefp=open("/dev/input/mouse0", "rb") 
  knt = 0 
    while(1) do  --inner 
      mousedata=getc(mousefp) 
      printf(1, "%d: %04x\n", {knt, mousedata}) 
      knt += 1 
      flush(SCREEN) 
      if get_key() = 'q' then exit end if 
    end while --inner 
  close(mousefp) 

Yet there is little job to do to decode mouse events. Regards Jean-Marc

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu