Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16784
Modified Files: Tag: desiredata desire.tk Log Message: KeyboardView: switched to using keycodes
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.220 retrieving revision 1.1.2.600.2.221 diff -C2 -d -r1.1.2.600.2.220 -r1.1.2.600.2.221 *** desire.tk 11 Jul 2007 21:39:58 -0000 1.1.2.600.2.220 --- desire.tk 11 Jul 2007 22:17:20 -0000 1.1.2.600.2.221 *************** *** 334,338 **** def EventHistory init {} {super; set @list {}} def EventHistory add {e} {lappend @list $e; $self changed add $e} ! def EventHistory list {} {return $@list} set ::event_history [EventHistory new]
--- 334,346 ---- def EventHistory init {} {super; set @list {}} def EventHistory add {e} {lappend @list $e; $self changed add $e} ! def EventHistory list {{formatted 1}} { ! if {!$formatted} {return $@list} ! set r {} ! foreach event $@list { ! mset {type W X Y mod K k} $event ! lappend r [format "%-13s %9s %4d %4d %4d %4d %s" $type $K $k $X $Y $mod $W] ! } ! return $r ! } set ::event_history [EventHistory new]
*************** *** 493,510 **** foreach type {KeyPress KeyRelease} { foreach {subtype mod} $mods { ! bind all <$subtype$type> "event_record $type %W %X %Y $mod %K" } } foreach type {ButtonPress ButtonRelease} { foreach {subtype mod} $mods { ! bind all <$type> "event_record $type %W %X %Y $mod %b" } } }
- proc event_record {type W X Y mod K} { - $::event_history add [format "%-13s %9s %4d %4d %4d %s" $type $K $X $Y $mod $W] - } - # there are two palettes of 30 colours used in Pd # when placed in a 3*10 grid, the difference is that --- 501,514 ---- foreach type {KeyPress KeyRelease} { foreach {subtype mod} $mods { ! bind all <$subtype$type> "$::event_history add [list $type %W %X %Y $mod %K %k]" } } foreach type {ButtonPress ButtonRelease} { foreach {subtype mod} $mods { ! bind all <$subtype$type> "$::event_history add [list $type %W %X %Y $mod %b %b]" } } }
# there are two palettes of 30 colours used in Pd # when placed in a 3*10 grid, the difference is that *************** *** 7908,7938 ****
set keyboard_layout { ! {Escape " " F1 F2 F3 F4 " " F5 F6 F7 F8 " " F9 F10 F11 F12} ! {grave 1 2 3 4 5 6 7 8 9 0 minus equal BackSpace} ! {Tab q w e r t y u i o p bracketleft bracketright backslash} ! {Caps_Lock a s d f g h j k l semicolon apostrophe Return} ! {Shift_L z x c v b n m comma period slash Shift_R} ! {Control_L Super_L Alt_L space Alt_R Super_R Menu Control_R} } foreach {k v} { ! Escape 5 ! BackSpace 5 ! Tab 4 backslash 4 ! Caps_Lock 5 Return 7 ! Shift_L 8 Shift_R 8 ! Control_L 4 Super_L 4 Alt_L 4 space 24 Alt_R 4 Super_R 4 Menu 4 Control_R 4 } {set keyboard_width_of($k) $v} ! foreach {k v} { ! grave ` minus - equal = bracketleft [ bracketright ] backslash \ BackSpace BkSp ! Caps_Lock Caps semicolon ; apostrophe ' comma , period . slash / ! Shift_L Shift Shift_R Shift Control_L Ctrl Control_R Ctrl Alt_L Alt Alt_R AltGr ! Super_L Win Super_R Win Escape Esc ! } {set keyboard_text_of($k) $v} ! foreach {k v} { ! ! 1 @ 2 # 3 $ 4 % 5 ^ 6 & 7 * 8 ( 9 ) 0 _ - + = ! Q q W w E e R r T t Y y U u I i O o P p { [ } ] | \ ! A a S s D d F f G g H h J j K k L l ; ' ! Z z X x C c V v B b N n M m < , > . ? / ! } {set keyboard_aliases($k) $v}
def KeyboardDialog init {history} { --- 7912,7951 ----
set keyboard_layout { ! {1 " " 67 68 69 70 " " 71 72 73 74 " " 75 76 95 96} ! {49 10 11 12 13 14 15 16 17 18 19 20 21 22} ! {23 24 25 26 27 28 29 30 31 32 33 34 35 51} ! {66 38 39 40 41 42 43 44 45 46 47 48 36} ! {50 52 53 54 55 56 57 58 59 60 61 62} ! {37 115 64 65 113 116 117 109} } + foreach {k v} { ! 1 5 ! 22 5 ! 23 4 51 4 ! 66 5 36 7 ! 50 8 62 8 ! 37 4 115 4 64 4 65 24 113 4 116 4 117 4 109 4 } {set keyboard_width_of($k) $v} ! ! proc namekey {i args} {foreach name $args {set ::keyboard_text_of($i) $name; incr i}} ! namekey 1 Esc ! namekey 67 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 ! namekey 95 F11 F12 ! namekey 49 ` ! namekey 10 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSp ! namekey 23 Tab Q W E R T Y U I O P {[ }] ! namekey 51 \| ! namekey 66 Caps ! namekey 38 A S D F G H J K L ;: '" ! namekey 36 Return ! namekey 50 Shift ! namekey 52 Z X C V B N M ,< .> /? Shift ! namekey 37 Ctrl ! namekey 115 Sup ! namekey 64 Alt Space ! namekey 113 AltGr ! namekey 116 Sup Menu ! namekey 109 Ctrl
def KeyboardDialog init {history} { *************** *** 7961,7966 ****
def KeyboardDialog notice {origin add event} { ! mset {type k x y m w} $event ! if {![info exists ::keyboard_row_of($k)]} {puts "unknown event $event"; return} set i $::keyboard_row_of($k) switch -- $type { --- 7974,7979 ----
def KeyboardDialog notice {origin add event} { ! mset {type W X Y mod K k} $event ! if {![info exists ::keyboard_row_of($k)]} {puts "unknown key $k"; return} set i $::keyboard_row_of($k) switch -- $type {