hi, I checked thru the code, and saw that 'ENTER' is actually used in
few points around; so yesterday I prepared this patch (that is only a
first draft) against SVN. (This patch does not apply to 1.8.3 in one
easily fixable point).

Here is the rationale. I have 4 remotes for modern player devices;
all of them share (at least) these features:

- 4 directional keys (kind of a 'joystick') with a center key, called 'GO' or 
'OK' or 'SELECT'

- a 'Power' key

- a 'Menu' key

I rearranged the freevo event system so that:

- the 'GO' (or 'OK' or 'SELECT') remote key is mapped to an unique 'SELECT' 
event

- similarly, the keyboard keys SPACE ENTER KEYPADENTER are all mapped to the 
'SELECT' event

- the 'ENTER' event is abolished from freevo, I  always remapped it to 'SELECT'

The final version of the patch will change the GUI to behave according
to this general rationale.

1) in each and every situation in which the enduser wants to select,
 or enter, or OK, a situation/submenu-item/dialog, then the SELECT button(s)
 will be the one and only button to do that

2) in each and every situation in which the enduser wants to 
 open a submenu to access all available actions and/or
 configure extra options , then the MENU button
 will be the one and only button to do that

3) the 'power' button will bring the enduser to the main menu
 (if not already there); when pressed in the main menu, 
 it will open the shutdown dialog

The attached patch does implement 1,2 but not 3. 

YET TODO: In my TODO list is to code (3) above; also to map the 'MENU'
key that is nowadays in many keyboards (it is the key between ALT and
CTRL) to the 'MENU_SUBMENU' EVENT; and keep the 'HOME' keyboard key
attached to 'MENU_GOTO_MAINMENU'

The patch already abolishes the confusion between 'ENTER' and 'SELECT'
for me, so I am already enjoying it.

Note that the patch is quite small.. (and in many places it just
changes comments and help lines) this testifies that the 'enter' event
was not really needed.

I wrote the patch before reading your answers, please comment on it,
at the same time I will try to change it to reflect any ideas of you.

a.


ps: in preparing the patch, I noted that there may be some confusion
between POWER and SHUTDOWN around... I will look into that as well
Index: src/audio/plugins/detach.py
===================================================================
--- src/audio/plugins/detach.py	(revisione 11233)
+++ src/audio/plugins/detach.py	(copia locale)
@@ -67,7 +67,7 @@
         freevo plugins -i audio.detach returns the info
         """
         return [
-            ('DETACH_KEY', 'DISPLAY', 'Event to activate the detach bar, DISPLAY, ENTER, EXIT'),
+            ('DETACH_KEY', 'DISPLAY', 'Event to activate the detach bar, DISPLAY, SELECT, EXIT'),
         ]
 
 
Index: src/audio/plugins/coversearch.py
===================================================================
--- src/audio/plugins/coversearch.py	(revisione 11233)
+++ src/audio/plugins/coversearch.py	(copia locale)
@@ -73,7 +73,7 @@
 class PluginInterface(plugin.ItemPlugin):
     """
     This plugin will allow you to search for CD Covers for your albums. To do that
-    just go in an audio item and press 'e' (on your keyboard) or 'ENTER' on your
+    just go in an audio item and press 'enter' (on your keyboard) or 'SELECT/GO' on your
     remote control. That will present you a list of options with Find a cover for
     this music as one item, just select it press 'enter' (on your keyboard) or
     'SELECT' on your remote control and then it will search the cover in amazon.com.
Index: src/audio/plugins/cdbackup.py
===================================================================
--- src/audio/plugins/cdbackup.py	(revisione 11233)
+++ src/audio/plugins/cdbackup.py	(copia locale)
@@ -128,7 +128,7 @@
     | CD_RIP_OGG_OPTS = ' '
 
     Finally, to actually backup an audio CD within Freeevo, when you are in the
-    Music menu, highlight/choose a CD, then hit 'e' on keyboard or 'ENTER' on
+    Music menu, highlight/choose a CD, then hit 'Enter' on keyboard or 'SELECT/GO' on
     your remote control and you will be able to access the rip/backup menu.
 
     Here is a list of all the above mentioned parameters for simple cutting and
Index: src/helpers/remote.py
===================================================================
--- src/helpers/remote.py	(revisione 11233)
+++ src/helpers/remote.py	(copia locale)
@@ -58,7 +58,7 @@
     usage()
 
 
-panels = [ ['1','2','3'], ['4','5','6'], ['7','8','9'], ['ENTER','0','EXIT'],
+panels = [ ['1','2','3'], ['4','5','6'], ['7','8','9'], ['SELECT','0','EXIT'],
            ['MENU','UP','GUIDE'], ['LEFT','SELECT','RIGHT'],
            ['DISPLAY','DOWN','SUBTITLE'], ['CH+','VOL+','PIP_ONOFF'],
            ['CH-','VOL-','PIP_SWAP'], ['PREV_CH','MUTE','PIP_MOVE'],
Index: src/helpers/makelircrc.py
===================================================================
--- src/helpers/makelircrc.py	(revisione 11233)
+++ src/helpers/makelircrc.py	(copia locale)
@@ -57,7 +57,7 @@
     'NEXT'   : 'CH+',
     'MENU/I' : 'MENU',
     'OK'     : 'SELECT',
-    'GO'     : 'ENTER',
+    'GO'     : 'SELECT',
     'RECORD' : 'REC',
     }
 
Index: src/helpers/plugins.py
===================================================================
--- src/helpers/plugins.py	(revisione 11233)
+++ src/helpers/plugins.py	(copia locale)
@@ -599,7 +599,7 @@
         print
         print 'There are five types of plugins:'
         print 'MainMenuPlugin: show items in the main menu or in the media main menu like video'
-        print 'ItemPlugin    : add actions to items, shown after pressing ENTER on the item'
+        print 'ItemPlugin    : add actions to items, shown after pressing SELECT on the item'
         print 'DaemonPlugin  : a plugin that runs in the background'
         print 'IdlebarPlugin : subplugin for the idlebar plugin'
         print 'Plugin        : plugin to add some functions to Freevo, see plugin description.'
Index: src/plugins/freevused.py
===================================================================
--- src/plugins/freevused.py	(revisione 11233)
+++ src/plugins/freevused.py	(copia locale)
@@ -35,7 +35,7 @@
 #     'STOP': 'EXIT',              # 3rd row center
 #     'VOL+': 'MIXER_VOLUP',       # 3rd row right
 #     'VOLM': 'MIXER_MUTE',        # 4th row left
-#     'SLCT': 'ENTER',             # 4th row center
+#     'SLCT': 'SELECT',            # 4th row center
 #     'MAIN': 'STOP',              # 4th row right
 
 #     'DISP': 'DISPLAY',           # More actions
@@ -172,7 +172,7 @@
     |   'STOP': 'EXIT',              # 3rd row center
     |   'VOL+': 'MIXER_VOLUP',       # 3rd row right
     |   'VOLM': 'MIXER_MUTE',        # 4th row left
-    |   'SLCT': 'ENTER',             # 4th row center
+    |   'SLCT': 'SELECT',            # 4th row center
     |   'MAIN': 'STOP',              # 4th row right
     |
     |   'DISP': 'DISPLAY',           # More actions
Index: src/tv/plugins/livepause/__init__.py
===================================================================
--- src/tv/plugins/livepause/__init__.py	(revisione 11233)
+++ src/tv/plugins/livepause/__init__.py	(copia locale)
@@ -605,7 +605,7 @@
 
     def __number_handle_button(self, event, menuw):
         consumed = False
-        if event.arg == 'ENTER' and self.channel_number:
+        if event.arg == 'SELECT' and self.channel_number:
             self.channel_number_timer.cancel()
             rc.post_event(TV_CHANNEL_NUMBER)
             consumed = True
Index: src/tv/plugins/irsend_generic.py
===================================================================
--- src/tv/plugins/irsend_generic.py	(revisione 11233)
+++ src/tv/plugins/irsend_generic.py	(copia locale)
@@ -66,7 +66,7 @@
 
         self.transmitSignal(chan_args)
         if self.enterkey:
-            # Sometimes you need to send a "ENTER" or a "SELECT"
+            # Sometimes you need to send a "ENTER"
             # after keying in a code.
             self.transmitSignal(self.enterkey)
 
Index: src/event.py
===================================================================
--- src/event.py	(revisione 11233)
+++ src/event.py	(copia locale)
@@ -289,7 +289,7 @@
     'DOWN'      : MENU_DOWN,
     'CH+'       : MENU_PAGEUP,
     'CH-'       : MENU_PAGEDOWN,
-    'MENU'      : MENU_GOTO_MAINMENU,
+    'MENU'      : MENU_SUBMENU,
     'TV'        : MENU_GOTO_TV,
     'MUSIC'     : MENU_GOTO_MUSIC,
     'VIDEOS'    : MENU_GOTO_VIDEOS,
@@ -298,7 +298,6 @@
     'EXIT'      : MENU_BACK_ONE_MENU,
     'SELECT'    : MENU_SELECT,
     'PLAY'      : MENU_PLAY_ITEM,
-    'ENTER'     : MENU_SUBMENU,
     'DISPLAY'   : MENU_CHANGE_STYLE,
     'EJECT'     : EJECT
     }
@@ -310,11 +309,10 @@
     'DOWN'      : MENU_DOWN,
     'CH+'       : MENU_PAGEUP,
     'CH-'       : MENU_PAGEDOWN,
-    'MENU'      : MENU_GOTO_MAINMENU,
-    'SHUTDOWN'  : MENU_GOTO_SHUTDOWN,
+    'MENU'      : MENU_SUBMENU,
+    'SHUTDOWN'  : MENU_GOTO_MAINMENU,
     'EXIT'      : MENU_BACK_ONE_MENU,
     'SELECT'    : MENU_SELECT,
-    'ENTER'     : MENU_SUBMENU,
     'DISPLAY'   : MENU_CHANGE_STYLE,
     'PLAY'      : PLAY,
     'REC'       : TV_START_RECORDING
@@ -322,7 +320,6 @@
 
 INPUT_EVENTS = {
     'EXIT'      : INPUT_EXIT,
-    'ENTER'     : INPUT_ENTER,
     'SELECT'    : INPUT_ENTER,
     'LEFT'      : INPUT_LEFT,
     'RIGHT'     : INPUT_RIGHT,
@@ -346,7 +343,6 @@
     'STOP'      : STOP,
     'MENU'      : STOP,
     'EXIT'      : STOP,
-    'SELECT'    : STOP,
     'PAUSE'     : PAUSE,
     'CH+'       : TV_CHANNEL_UP,
     'CH-'       : TV_CHANNEL_DOWN,
@@ -401,7 +397,6 @@
     'DOWN'      : DVDNAV_DOWN,
     'LEFT'      : DVDNAV_LEFT,
     'RIGHT'     : DVDNAV_RIGHT,
-    'ENTER'     : DVDNAV_SELECT,
     'SELECT'    : DVDNAV_SELECT,
     'DISPLAY'   : TOGGLE_OSD,
     'REW'       : Event(SEEK, arg=-10),
@@ -483,7 +478,7 @@
     '0'         : IMAGE_NO_ZOOM,
     'DISPLAY'   : TOGGLE_OSD,
     'REC'       : IMAGE_SAVE,
-    'ENTER'     : IMAGE_TAG,
+    'SELECT'    : IMAGE_TAG,
     'UP'        : PLAYLIST_PREV,
     'DOWN'      : PLAYLIST_NEXT,
     'CH+'       : PLAYLIST_PREV,
@@ -517,7 +512,6 @@
 
 GAMES_EVENTS = {
     'STOP'      : STOP,
-    'SELECT'    : STOP,
     'MENU'      : MENU,
     'DISPLAY'   : GAMES_CONFIG,
     'ENTER'     : GAMES_RESET
@@ -562,7 +556,6 @@
     key.K_9           : '9',
     key.K_0           : '0',
     key.K_d           : 'DISPLAY',
-    key.K_e           : 'ENTER',
     key.K_UNDERSCORE  : 'PREV_CH',
     key.K_o           : 'PIP_ONOFF',
     key.K_w           : 'PIP_SWAP',
@@ -621,8 +614,7 @@
     'KEY_0'           : '0',
     'KEY_VENDOR'      : 'DISPLAY',
     'KEY_D'           : 'DISPLAY',
-    'KEY_MENU'        : 'ENTER',
-    'KEY_E'           : 'ENTER',
+    'KEY_MENU'        : 'MENU',
     'KEY_MINUS'       : 'PREV_CH',
     'KEY_O'           : 'PIP_ONOFF',
     'KEY_W'           : 'PIP_SWAP',
Index: src/osd.py
===================================================================
--- src/osd.py	(revisione 11233)
+++ src/osd.py	(copia locale)
@@ -87,7 +87,6 @@
 9       9
 0       0
 d       DISPLAY
-e       ENTER
 _       PREV_CH
 o       PIP_ONOFF
 w       PIP_SWAP
------------------------------------------------------------------------------
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to