Fix keysym SPACE

db4
Slava Pestov 2009-03-05 13:35:00 -06:00
parent 7b9491066c
commit ee87ca7db6
1 changed files with 13 additions and 12 deletions

View File

@ -1,10 +1,10 @@
! Copyright (C) 2005, 2009 Slava Pestov. ! Copyright (C) 2005, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs kernel math math.order models USING: accessors arrays assocs kernel math math.order models
namespaces make sequences words strings system hashtables namespaces make sequences words strings system hashtables math.parser
math.parser math.vectors classes.tuple classes boxes calendar math.vectors classes.tuple classes boxes calendar alarms combinators
alarms combinators sets columns fry deques ui.gadgets sets columns fry deques ui.gadgets ui.gadgets.private unicode.case
ui.gadgets.private unicode.case combinators.short-circuit call ; unicode.categories combinators.short-circuit call ;
IN: ui.gestures IN: ui.gestures
GENERIC: handle-gesture ( gesture gadget -- ? ) GENERIC: handle-gesture ( gesture gadget -- ? )
@ -236,12 +236,10 @@ SYMBOL: drag-timer
: multi-click? ( button -- ? ) : multi-click? ( button -- ? )
{ {
{ [ multi-click-timeout? not ] [ f ] } [ multi-click-timeout? ]
{ [ multi-click-button? not ] [ f ] } [ multi-click-button? ]
{ [ multi-click-position? not ] [ f ] } [ multi-click-position? ]
{ [ multi-click-position? not ] [ f ] } } 0&& nip ;
[ t ]
} cond nip ;
: update-click# ( button -- ) : update-click# ( button -- )
global [ global [
@ -310,8 +308,11 @@ M: object modifiers>string
M: key-down gesture>string M: key-down gesture>string
[ mods>> ] [ sym>> ] bi [ mods>> ] [ sym>> ] bi
dup { [ length 1 = ] [ upper? ] } 1&& {
[ [ S+ prefix ] dip ] [ >upper ] if { [ dup { [ length 1 = ] [ first Letter? ] } 1&& ] [ [ S+ prefix ] dip ] }
{ [ dup " " = ] [ drop "SPACE" ] }
[ >upper ]
} cond
[ modifiers>string ] dip append ; [ modifiers>string ] dip append ;
M: button-up gesture>string M: button-up gesture>string