anchor.diff:  	   (handle-scroll input))
   	  ((typep input 'absolute-event)
   	   (handle-pen input))
  +	  ((typep input 'keyboard-event)
  +	   (handle-button input))
   	  (t nil))    
       ))
   
  
positive.code:   (asdf:load-system 'cl-evdev)
    )
  
  (defclass wa-mask
      (glut:window) ()
    (:default-initargs :pos-x 100 :pos-y 100
  		     :width 250 :height 250
                       :mode '(:single :rgb) :title ""))
  (defmethod glut:display-window :before ((w wa-mask))
    (gl:clear-color 0 0 0 0)
    (gl:matrix-mode :projection)
    (gl:load-identity)
    (gl:ortho 0 1 0 1 -1 1)
    )
  
  (setq color .7)
  (defmethod glut:display ((w wa-mask))
    (gl:clear :color-buffer)
    (gl:color color 0 1)
    (gl:with-primitive :polygon
      (gl:vertex 0.25 0.25 0)
      (gl:vertex .75 0.25 0)
      (gl:vertex 0.75 0.75 0)
      (gl:vertex 0.25 0.75 0))
    (gl:flush))
  
  (setq evdev-id "usb-WACOM_CTE-440-U_V4.0-3-mouse"
     evdev-stream '()
     calibrate t)
  
  (setq pressure 0
     abs-x nil
     abs-y nil)
  
  (defun handle-pen (event)
    (with-slots (value type) event
      (let ((axis (cadr type)))
        
        (cond ((equal axis 'ABS_PRESSURE)
  	     (setq pressure value))
  	    ((equal axis 'ABS_X)
  	     (setq abs-x value))
  	    ((equal axis 'ABS_Y)
  	     (setq abs-y value)))
  
        (setq color .7)
        (if (> pressure 100)
  	  (setq color .5))
        (if (> pressure 200)
  	  (setq color 0))
        (glut:post-redisplay)
        )
      )  
    )
  
  (defun handle-scroll (event)
    (with-slots (value) event
      ;; (print value)   
      )
    nil
  )
  
  (defun process-wacom-stream ()
  
negative.code:     (format t "~%~%")
      ))       
  
  (defclass wa-mask
      (glut:window) ()
    (:default-initargs :pos-x 100 :pos-y 100
  		     :width 250 :height 250
                       :mode '(:single :rgb) :title ""))
  (defmethod glut:display-window :before ((w wa-mask))
    (gl:clear-color 0 0 0 0)
    (gl:matrix-mode :projection)
    (gl:load-identity)
    (gl:ortho 0 1 0 1 -1 1)
    )
  
  (defun clear-grid (size)
    (setq grid (make-array (list size size)
  		    :initial-element '(0 0 0)))
    (setf (aref grid 10 10) '(1 0 1))
    )
  (setq grid-size 100
     grid (clear-grid grid-size))
  
  (defun quad (a b c
  	 d e f
  	 g h i
  	 j k l)
    (gl:with-primitive :polygon
      (gl:vertex a b c)
      (gl:vertex d e f)
      (gl:vertex g h i)
      (gl:vertex j k l))
    )
  
  (defun grid-color (x y)
    (setq rgb (aref grid x y))
    (gl:color (first rgb) 
  	    (second rgb)
  	    (third rgb))
  )
  (defmethod glut:display ((w wa-mask))
    (gl:clear :color-buffer)  
    (loop for x from 0 to (- grid-size 1) do   
         (loop for y from 0 to (- grid-size 1) do  
  	    (setq j (- grid-size (+ 1 y)))
  	    (grid-color x j)
  	    (setq factor .01)
  	    (quad (* factor x) (* factor y) 0
  		  (* factor (+ 1 x)) (* factor y) 0
  		  (* factor (+ 1 x)) (* factor (+ 1 y)) 0
  		  (* factor x) (* factor (+ 1 y)) 0)
  	    ))  
    (gl:flush))
  
  (defun wa ()
    (bordeaux-threads:make-thread
     'process-wacom-stream :name "wacom-stream-process")
    (glut:display-window (make-instance 'wa-mask))
    (cl-user::quit)
    )
  
  (defun compile-wa-image ()
  