anchor.diff:        (alt-key  nil)
         (esc-key  nil))
     (defun get-ch ()
  -    (charms/ll:PDC-save-key-modifiers 1)
  -    (let ((code          (charms/ll:getch))
  +    (let ((code          (getch-pad))
             (modifier-keys (charms/ll:PDC-get-key-modifiers)))
         (setf ctrl-key (logtest modifier-keys charms/ll:PDC_KEY_MODIFIER_CONTROL))
         (setf alt-key  (logtest modifier-keys charms/ll:PDC_KEY_MODIFIER_ALT))
  
positive.code:   (when (<= #xd800 code #xdbff)
      (charms/ll:timeout 100)
      (let ((c-lead  code)
            (c-trail (charms/ll:getch)))
        (when (<= #xdc00 c-trail #xdfff)
          (setf code (+ #x10000 (* (- c-lead #xd800) #x0400) (- c-trail #xdc00))))
        (charms/ll:timeout -1)))
  
negative.code: (cffi:load-foreign-library '(:default "User32"))
  (defvar *windows-code-page*
    (cffi:foreign-funcall "GetConsoleOutputCP" :int))
  
  ;; for input
  ;; (we can't use *stdscr* for input because it calls wrefresh implicitly)
  (defvar *padwin* nil)
  (defun getch-pad ()
    (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
  (defkeycode "[resize]" #x222)
  