Normally, for a USB mouse, I don't believe we differentiate between the one button versus another, but I haven't tested that. IF the buttons were sent to the brightsign like keyboard buttons, then that wouldn't be a problem.
At this point, I'm not sure if this will work.
0
Charles Wildenauer
Understood, I will go at it with keyboard hardware instead then.
I am going to try the Gefen USB extender with a Hagstrom KE-USB36 keyboard encoder. I will let you know how it goes.
Thanks for the Help.
0
Charles Wildenauer
Lyndon,
How would I go about creating a script for using keyboard?
Could you please send me a sample script, I just need to hit a key and have a video clip play... for two clips.
Thanks
0
RokuLyndon
This is something I had written previously to do some testing. It has lots of comments in it, otherwise, it could be much shorter. You can copy it to at ext file, and name the file autorun.brs:
REM Start of script
debug = true
REM
rem This script waits for a button press to starting playing a video
rem It plays numbered videos from 1 - 4. It plays each video in a loop
rem until it detects another button press. Pressing a button 1 when video1
rem is playing will restart video1. Assumes video1.mpg, video2.mpg,
rem video3.mpg, video4.mpg are present. Use buttons 1 - 4 to play videos 1 - 4.
rem
REM Initialize Video & Button
video=CreateObject("roVideoPlayer")
rem mode=CreateObject("roVideoMode")
kbpress=CreateObject("roKeyboard")
p=CreateObject("roMessagePort")
video.SetPort(p)
kbpress.SetPort(p)
REM Set Constants
REM **************************************
MEDEN=8
video_to_play$=""
one=49 'value returned when you press #1 on the keyboard
two=50 'value returned when you press #2 on the keyboard
three=51 'value returned when you press #3 on the keyboard
four=52 'value returned when you press #4 on the keyboard
rem
rem Waiting for a keyboard press to start playback
rem All buttons are ignored except for buttons 1 - 4
rem
wait_for_key:
If debug print "Waiting for a key to be pressed."
msg=wait(0,p)
if type(msg)="roKeyboardPress" then
if msg.GetInt() = one then
video_to_play$="video1.mpg"
else if msg.GetInt() = two then
video_to_play$="video2.mpg"
else if msg.GetInt() = three then
video_to_play$="video3.mpg"
else if msg.GetInt() = four then
video_to_play$="video4.mpg"
endif
else if type(msg)="roVideoEvent" then
status=msg.GetInt()
if status <> MEDEN then goto wait_for_key
goto play_video
endif
play_video:
if debug print "Current file is: "; video_to_play$