From: <aw...@us...> - 2012-11-23 21:09:14
|
Revision: 12987 http://openmsx.svn.sourceforge.net/openmsx/?rev=12987&view=rev Author: awulms Date: 2012-11-23 21:09:08 +0000 (Fri, 23 Nov 2012) Log Message: ----------- Adapt OSD scripts to use new OSDcontrol events Modified Paths: -------------- openmsx/trunk/share/scripts/osd_keyboard.tcl openmsx/trunk/share/scripts/osd_menu.tcl Modified: openmsx/trunk/share/scripts/osd_keyboard.tcl =================================================================== --- openmsx/trunk/share/scripts/osd_keyboard.tcl 2012-11-23 20:59:11 UTC (rev 12986) +++ openmsx/trunk/share/scripts/osd_keyboard.tcl 2012-11-23 21:09:08 UTC (rev 12987) @@ -48,17 +48,17 @@ unbind_default "mouse button1 down" unbind_default "mouse button1 up" unbind_default "mouse button3 down" - unbind_default "keyb UP" - unbind_default "keyb DOWN" - unbind_default "keyb LEFT" - unbind_default "keyb RIGHT" + unbind_default "OSDcontrol UP PRESS" + unbind_default "OSDcontrol DOWN PRESS" + unbind_default "OSDcontrol LEFT PRESS" + unbind_default "OSDcontrol RIGHT PRESS" if {$is_dingoo} { unbind_default "keyb LCTRL,PRESS" unbind_default "keyb LCTRL,RELEASE" unbind_default "keyb LALT" } else { - unbind_default "keyb SPACE,PRESS" - unbind_default "keyb SPACE,RELEASE" + unbind_default "OSDcontrol A PRESS" + unbind_default "OSDcontrol A RELEASE" } #reset keyboard matrix for {set i 0} {$i <= 8} {incr i} { @@ -90,17 +90,17 @@ bind_default "mouse button3 down" {osd_keyboard::key_hold_toggle} - bind_default "keyb UP" -repeat {osd_keyboard::selection_row -1} - bind_default "keyb DOWN" -repeat {osd_keyboard::selection_row +1} - bind_default "keyb LEFT" -repeat {osd_keyboard::selection_col -1} - bind_default "keyb RIGHT" -repeat {osd_keyboard::selection_col +1} + bind_default "OSDcontrol UP PRESS" -repeat {osd_keyboard::selection_row -1} + bind_default "OSDcontrol DOWN PRESS" -repeat {osd_keyboard::selection_row +1} + bind_default "OSDcontrol LEFT PRESS" -repeat {osd_keyboard::selection_col -1} + bind_default "OSDcontrol RIGHT PRESS" -repeat {osd_keyboard::selection_col +1} if {$is_dingoo} { bind_default "keyb LCTRL,PRESS" {osd_keyboard::selection_press } bind_default "keyb LCTRL,RELEASE" {osd_keyboard::selection_release} bind_default "keyb LALT" {osd_keyboard::key_hold_toggle } } else { - bind_default "keyb SPACE,PRESS" {osd_keyboard::selection_press } - bind_default "keyb SPACE,RELEASE" {osd_keyboard::selection_release} + bind_default "OSDcontrol A PRESS" {osd_keyboard::selection_press } + bind_default "OSDcontrol A RELEASE" {osd_keyboard::selection_release} } #Define Keyboard (how do we handle the shift/ctrl/graph command?) @@ -481,6 +481,10 @@ bind_default "keyb RETURN" toggle_osd_keyboard } +# Android maps one of the virtual keys to WORLD_95 +# listen to that one in order to show the keyboard +bind_default "keyb WORLD_95" toggle_osd_keyboard + namespace export toggle_osd_keyboard };# namespace osd_keyboard Modified: openmsx/trunk/share/scripts/osd_menu.tcl =================================================================== --- openmsx/trunk/share/scripts/osd_menu.tcl 2012-11-23 20:59:11 UTC (rev 12986) +++ openmsx/trunk/share/scripts/osd_menu.tcl 2012-11-23 21:09:08 UTC (rev 12987) @@ -241,17 +241,16 @@ set ::pause true # TODO make these bindings easier to customize - bind_default "keyb UP" -repeat {osd_menu::menu_action UP } - bind_default "keyb DOWN" -repeat {osd_menu::menu_action DOWN } - bind_default "keyb LEFT" -repeat {osd_menu::menu_action LEFT } - bind_default "keyb RIGHT" -repeat {osd_menu::menu_action RIGHT} + bind_default "OSDcontrol UP PRESS" -repeat {osd_menu::menu_action UP } + bind_default "OSDcontrol DOWN PRESS" -repeat {osd_menu::menu_action DOWN } + bind_default "OSDcontrol LEFT PRESS" -repeat {osd_menu::menu_action LEFT } + bind_default "OSDcontrol RIGHT PRESS" -repeat {osd_menu::menu_action RIGHT} if {$is_dingoo} { bind_default "keyb LCTRL" {osd_menu::menu_action A } bind_default "keyb LALT" {osd_menu::menu_action B } } else { - bind_default "keyb SPACE" {osd_menu::menu_action A } - bind_default "keyb RETURN" {osd_menu::menu_action A } - bind_default "keyb ESCAPE" {osd_menu::menu_action B } + bind_default "OSDcontrol A PRESS" {osd_menu::menu_action A } + bind_default "OSDcontrol B PRESS" {osd_menu::menu_action B } } } @@ -275,17 +274,16 @@ set ::pause false # TODO avoid duplication with 'main_menu_open' - unbind_default "keyb UP" - unbind_default "keyb DOWN" - unbind_default "keyb LEFT" - unbind_default "keyb RIGHT" + unbind_default "OSDcontrol UP PRESS" + unbind_default "OSDcontrol DOWN PRESS" + unbind_default "OSDcontrol LEFT PRESS" + unbind_default "OSDcontrol RIGHT PRESS" if {$is_dingoo} { unbind_default "keyb LCTRL" unbind_default "keyb LALT" } else { - unbind_default "keyb SPACE" - unbind_default "keyb RETURN" - unbind_default "keyb ESCAPE" + unbind_default "OSDcontrol A PRESS" + unbind_default "OSDcontrol B PRESS" } namespace eval ::osd_control {unset close} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |