Index: main/cdk.lisp
===================================================================
--- main/cdk.lisp	(revision main,29)
+++ main/cdk.lisp	(revision main,89)
@@ -21,8 +21,8 @@
 (defconstant +ok+ 0)
 
-(defcvar ("cdk_exit_early" +cdk-exit-early+) :int :read-only t)
-(defcvar ("cdk_exit_escape" +cdk-exit-escape+) :int :read-only t)
-(defcvar ("cdk_exit_normal" +cdk-exit-normal+) :int :read-only t)
-(defcvar ("cdk_exit_never" +cdk-exit-never+) :int :read-only t)
+(defcvar (("cdk_exit_early" +cdk-exit-early+) :read-only t) :int)
+(defcvar (("cdk_exit_escape" +cdk-exit-escape+) :read-only t) :int)
+(defcvar (("cdk_exit_normal" +cdk-exit-normal+) :read-only t) :int)
+(defcvar (("cdk_exit_never" +cdk-exit-never+) :read-only t) :int)
 
 ;;; Screen-wide, initialization, and finalization routines.
Index: main/form.lisp
===================================================================
--- main/form.lisp	(revision main,87)
+++ main/form.lisp	(revision main,89)
@@ -287,11 +287,11 @@
              (refresh form)
              (let ((key (activate (f-peer) :key-callback #'callback)))
-               (case key
-                 ((#\Return #\Newline #\Tab :key-down)
-                  (incf focus)
-                  (boundf focus 0 (1- n)))
-                 ((:key-btab :key-up)
-                  (decf focus)
-                  (boundf focus 0 (1- n)))
+               (cond
+                 ((and (member key '(#\Return #\Newline #\Tab :key-down))
+                       (< focus (1- n)))
+                  (incf focus))
+                 ((and (member key '(:key-btab :key-up))
+                       (> focus 0))
+                  (decf focus))
                  (t
                   (return-from activate key))))))))))
Index: main/lisp.sh
===================================================================
--- main/lisp.sh	(revision main,20)
+++ main/lisp.sh	(revision main,89)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-sbcl --load /usr/share/emacs/site-lisp/slime/swank-loader.lisp --eval "(setf swank:*communication-style* :fd-handler)" --eval "(swank:create-server)" --eval "(declaim (optimize debug safety (compilation-speed 1) (speed 0) (space 0)))"
+sbcl --load /usr/share/emacs/site-lisp/slime/swank-loader.lisp --eval "(setf swank:*communication-style* :fd-handler)" --eval "(swank:create-server)" --eval "(declaim (optimize debug safety (compilation-speed 1) (speed 0) (space 0)))" --eval "(declaim (sb-ext:muffle-conditions sb-ext:compiler-note))"
Index: main/simple-table.lisp
===================================================================
--- main/simple-table.lisp	(revision main,83)
+++ main/simple-table.lisp	(revision main,89)
@@ -62,4 +62,5 @@
                      (select-callback 'nothing) (scroll-callback 'nothing))
   (with-slots (window data model grid) tbl
+    (cdk::c-keypad (window-pointer window) t)
     (flet ((notify ()
              (funcall select-callback)
@@ -70,4 +71,5 @@
       (loop
          (draw tbl)
+         (refresh window)
          (let ((key (read-key window)))
            (case key
