[openfirmware] [commit] r1899 - dev/olpc/keyboard

repository service svn at openfirmware.info
Mon Aug 2 07:43:02 CEST 2010


Author: wmb
Date: Mon Aug  2 07:43:02 2010
New Revision: 1899
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1899

Log:
OLPC trac 10262 - In keyboard selftest, distinguish between a key that has been pressed and one that is currently down.

Modified:
   dev/olpc/keyboard/selftest.fth

Modified: dev/olpc/keyboard/selftest.fth
==============================================================================
--- dev/olpc/keyboard/selftest.fth	Thu Jul 29 08:41:26 2010	(r1898)
+++ dev/olpc/keyboard/selftest.fth	Mon Aug  2 07:43:02 2010	(r1899)
@@ -489,7 +489,8 @@
 raw-scancode value cur-sc-table
 [then]
 
-h# 07ff constant pressed-key-color
+h# f81f constant down-key-color
+h# 07ff constant tested-key-color
 h# 001f constant idle-key-color
 h# ffff constant kbd-bc
 
@@ -511,8 +512,9 @@
       " fill-rectangle" $call-screen
    then
 ;
-: key-down  ( key# -- )  pressed-key-color draw-key  ;
-: key-up    ( key# -- )  idle-key-color    draw-key  ;
+: key-tested ( key# -- )  tested-key-color draw-key  ;
+: key-down   ( key# -- )  down-key-color   draw-key  ;
+: key-up     ( key# -- )  idle-key-color   draw-key  ;
 
 : fill-screen  ( color -- )
    0 0 " dimensions" $call-screen " fill-rectangle" $call-screen
@@ -536,6 +538,7 @@
       else                                   ( scan key# )
          swap h# 80 and  if   \ Up           ( key# )
             final-test?  smt-test?  or  if   ( key# )
+               dup key-tested                ( key# )
                dup 0=  last-1 0= and  last-2 0=  and  if   ( key# )
                   drop true                  ( exit? )
                else                          ( key# )



More information about the openfirmware mailing list