Design question ... Remote control and keyboard
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   shay_te
Posted On:   Friday, August 29, 2008 03:58 PM

Hey i am building a system that should support remote control input and keyboard input the system is a addons based any user could build any addon he wishes i have now two main input events types "KeyEvent" and "RemoteControlEvent" i wish to use only one type of event i am thinking of 2 options. 1) Map "RemoteControlEvent" to "KeyEvent" if this why is the best what happens i a situation that i mapped J key to the RECORD button how a specific addon should know that a RECORD operation is pressed or it's just a J button 2) Write a new events that contains "KeyEvent" actions    More>>

Hey i am building a system that should support remote control input and keyboard input

the system is a addons based any user could build any addon he wishes



i have now two main input events types "KeyEvent" and "RemoteControlEvent"



i wish to use only one type of event

i am thinking of 2 options.



1) Map "RemoteControlEvent" to "KeyEvent"

if this why is the best what happens i a situation that i mapped J key to the RECORD button

how a specific addon should know that a RECORD operation is pressed or it's just a J button



2) Write a new events that contains "KeyEvent" actions

and "RemteControlEvent" actions





thanks allot

   <<Less

Re: Design question ... Remote control and keyboard

Posted By:   Anil_Datt  
Posted On:   Monday, September 8, 2008 01:26 PM

"Event" is generic.
"RemoteControlEvent" and "KeyBoardEvent" are specific. I call it "KeyBoardEvent" as remote also has keys. The Event and hence the inherited specific Events should have "Event Type" to identify what type of Event it is. Now write common events and make them specific.
You should also have a Helper which would help transform from KeyBoardEvent to RemoteControlEvent or vice versa if needed
About | Sitemap | Contact