anchor.diff:                      :until (or (= code2 -1)
                                  (= code2 #x04d)	   ; M
                                  (= code2 #x06d)))   ; m
  -                 (setf code -1)))
  -              (charms/ll:timeout -1)))
  +                 (setf code -1)))))
              ))
           ;; normal key workaround
           (t
  
positive.code: ;; deal with utf-16 surrogate pair characters (input)
  (defun get-key (code)
    (when (<= #xd800 code #xdbff)
      (charms/ll:timeout 100)
      (let ((c-lead  code)
            (c-trail (getch-pad)))
        (when (<= #xdc00 c-trail #xdfff)
          (setf code (+ #x10000 (* (- c-lead #xd800) #x0400) (- c-trail #xdc00))))
        (charms/ll:timeout -1)))
    (char-to-key (code-char code)))
  
  ;; enable modifier keys
  
negative.code:   (unless *padwin*
      (setf *padwin* (charms/ll:newpad 1 1))
      (charms/ll:keypad *padwin* 1)
      (charms/ll:PDC-save-key-modifiers 1)
      ;; timeout setting is necessary to exit lem normally
      (charms/ll:wtimeout *padwin* 100))
    (charms/ll:wgetch *padwin*))
  
  ;; for resizing display
  