anchor.diff:                    (get-key code))))))))
   
   ;; workaround for exit problem
  -(defun console-input-count ()
  -  (let ((hdl (cffi:foreign-funcall "GetStdHandle" :int -10 :int)))
  -    (cffi:with-foreign-objects ((count :int))
  -      (if (cffi:foreign-funcall "GetNumberOfConsoleInputEvents"
  -                                :int hdl :pointer count :boolean)
  -          (cffi:mem-ref count :int)
  -          0))))
  -
  -;; workaround for exit problem
   (defun input-loop (editor-thread)
     (handler-case
         (loop
  
positive.code:   (unless *padwin*
      (setf *padwin* (charms/ll:newpad 1 1))
      (charms/ll:keypad *padwin* 1)
      (charms/ll:PDC-save-key-modifiers 1))
    (charms/ll:wgetch *padwin*))
  
  ;; for resizing display
  
negative.code:                     :until (or (= code2 -1)
                                 (= code2 #x04d)	   ; M
                                 (= code2 #x06d)))   ; m
                   (setf code -1)))))
             ))
          ;; normal key workaround
          (t
  