Sign up here and you can log into the forum!

Simulated USB Keyboard + WebEnd Keyboard

Here is the place to inquire about app.bins--Only currently available apps for sigma 8655 based wdtv's belong in this forum. requests go in 'Application Questions'

Simulated USB Keyboard + WebEnd Keyboard   

Postby b-rad.cc » Sat May 28, 2011 9:06 am

Hello,

Something new that i've developed is a 'fake' usb keyboard. This software tricks dmaosd into thinking there is always a real keyboard attached to the wdtv, which means I can then inject keyboard scan codes into the input stream and we get a console-input / web keyboard.

usage:
Code: Select all
fakekey <single character>

examples:
Code: Select all
fakekey a
fakekey ' '

no newline is added
------------------------------------------------------------------------------------------------------------------

usage:
Code: Select all
fakekey [-n] <string>

examples:
Code: Select all
fakekey 'this is a test string'

newline is added automatically + characters are injected every 250ms to ensure none are dropped.
-n to suppress default newline.
------------------------------------------------------------------------------------------------------------------

usage: (Special meta commands - HOME/ENTER/UP/DOWN/LEFT/RIGHT/ESCAPE/BACKSPACE/DELETE/PAGEUP/PAGEDOWN)
Code: Select all
fakekey <meta command>

examples:
Code: Select all
fakekey HOME
fakekey UP
fakekey ENTER
fakekey ESCAPE

------------------------------------------------------------------------------------------------------------------

full help:
Code: Select all
fakekey -h
keyboard injector 0.0.7 - © b-rad - http://nextdimension.cc - http://wdlxtv.com
  usage: fakekey [-n|-h] <input>
   options:
      -h   this help
      -n   no newline after input
   input:
      single character without newline
      string with newline added (default)
      meta character:
         - HOME
         - ENTER
         - UP
         - DOWN
         - LEFT
         - RIGHT
         - ESCAPE (back)
         - BACKSPACE
         - DELETE
         - PAGEUP (previous |<<)
         - PAGEDOWN (next >>|)



capitalization and normal special characters are handled. Basically any key of worth on a standard US keyboard is available, which translates to anything in ASCII range 32-127.

still need to do / bugs:
- detect real usb keyboards hot plugged after boot and relay their input events
- 'invalid character' message, but still works


Webend keyboard finished! :ugeek:

Webend Keyboard features:
- designed for 800x480 phone display
- all mapped keys are portrayed
- buttons are sent to the OSD as they are pushed
- clear button to wipe keyboard output display
- all real keyboard key presses are sent to the OSD while the web keyboard has focus
- confirmed working in firefox, opera, & android 2.2 (hw & sw kb)

webend keyboard bugs:
- android (2.2) hardware arrow keys don't work
- androiod (2.2) hardware backspace doesn't always work
- single quote not working on some systems
- backspace works as spacebar in some systems (?)
- backslash logs out on some systems, duplicate character & newline on others
- opera mobile & other browsers formatting issues, rolling keys to the next row
- android (3.1) formatting is off
- special characters (!$%&) don't work with android keyboard (gingerbread)

virtualkeyboard.app.bin
This app.bin requires WDLXTV based off official firmware 1.03.49 or higher

please tell me what you think 8-)
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby recliq » Sun May 29, 2011 2:07 am

- i think both would be quite useful single keys and lines. Since i don't know what fakekey actually does maybe it would make sense to split this either in two commands (fakekey/fakeline) or make fakekey having two modes.
- metakey seem fine to me...
- does this maybe help with your caps problem?
http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: USB Fake Keyboard   

Postby b-rad.cc » Sun May 29, 2011 10:20 am

I found the authoritative list in includes/linux/input.h.

I've done a bit more toying around and i think i'll just process argv[1]. if its more than one character i'll add a newline, but still offer -n, like echo. This make it deviate from echo's behavior only in the single character case.

Theres one other bit I have to work in...dmaosd only pairs with one keyboard. This is not an issue if the real keyboard is paired, since thats just simple scan code injection...but if the fake keyboard gets paired then all keys from the real keyboard must then be intercepted and relayed to the fake keyboard...so that both work simultaneously. Not really hard, but will require a little thread checking for new keyboards.
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby b-rad.cc » Sun May 29, 2011 10:39 am

oh, and i figured out capitals and 'upper case numbers' (!@#$%^) and caps lock. I won't be supporting caps lock, but upper case will be.
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby b-rad.cc » Sun May 29, 2011 11:01 pm

ok, working code & samples included in top post :mrgreen:

PLAY & REVIEW :ugeek:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby b-rad.cc » Mon May 30, 2011 12:34 am

bump...help messages and 'no newline' parameter added...
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby juliojs » Mon May 30, 2011 1:35 am

Great!

I was waiting for this feature to drop the onscreen keyboard feature from the android app. :D

EDIT: Test made with the first version not version with the help and no new line.
After some test:
- I'm getting a "invalid character!" warning/error sending any character or test.
- Some characters are dropped randomly. Maybe due to sleep time? I'm using 350ms between commands on the android app, but it's via a network connection so the 150ms should be enought...
- Sometimes new line (fake the OK button) is not working.
- Known issue / request: Special characters (áéíóú... etc) are not working. Any plans on support them? Important for non-english users :D

Here is a full log of my test (text after **** is my comment):

Code: Select all
# fakekey a         **** OK - NO NEW LINE
Single character: 'a' / 97 / 30

# fakekey test         **** OK - NEW LINE
invalid character!

# fakekey 'test'      **** missing 's' character (tet)- NEW LINE
invalid character!

# fakekey 'test'      **** OK - NO NEW LINE
invalid character!

# fakekey 'test'      **** missing 's' character (tet)- NEW LINE
invalid character!

# fakekey 'test'      **** missing 's' character (tet)- NEW LINE
invalid character!

# fakekey 'test'      **** OK - NEW LINE
invalid character!

# fakekey 'test'      **** OK - NEW LINE
invalid character!

# fakekey 'test'      **** OK - NEW LINE
invalid character!

# fakekey test         **** OK - NEW LINE
invalid character!

# fakekey test         **** OK - NEW LINE
invalid character!

# fakekey test         **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** missing 's' character (Tet)- NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** missing 't' character (Tes)- NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** missing 't' character (Tes)- NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** missing 't' character (Tes)- NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** missing 's' character (Tet)- NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'Test'      **** OK - NEW LINE
invalid character!

# fakekey 'this is a test'   **** OK - NEW LINE
invalid character!

# fakekey 'this is a test'   **** missing ' ' character (thisis a test)- NEW LINE
invalid character!

# fakekey 'this is a test'   **** missing ' ' character (thisis a test)- NEW LINE
invalid character!

# fakekey 'this is a test'   **** OK - NEW LINE
invalid character!

# fakekey 'this is a test'   **** missing 'i' character (ths is a test)- NEW LINE
invalid character!

# fakekey 'this is a test'   **** OK - NEW LINE
invalid character!

# fakekey 'this is a test'   **** OK - NEW LINE
invalid character!

# fakekey 'this is a test'   **** missing 's' character (thi is a test)- NEW LINE
invalid character!

# fakekey 'this is a test'   **** missing two ' ' character (thisisa test)- NEW LINE
invalid character!

# fakekey 'this is a test'   **** missing ' ' character (this isa test)- NEW LINE
invalid character!

# fakekey 'ThIs Is A tEsT'   **** missing ' ' character ('ThIsIs A tEsT')- NEW LINE
invalid character!

# fakekey 'ThIs Is A tEsT'   **** missing 's' character ('ThIsIs A tET')- NEW LINE
invalid character!

# fakekey 'ThIs Is A tEsT'   **** missing 'I' character ('Ths Is A tET')- NEW LINE
invalid character!


thanks! ;)
Image Android app-> WDTV MediaPlayers Remote
WDTV blog (Spanish)-> wdtv-osdmod.blogspot.com
juliojs
OSD Themer
 
Posts: 87
Joined: Fri Apr 16, 2010 1:01 am

Re: USB Fake Keyboard   

Postby b-rad.cc » Mon May 30, 2011 10:13 am

i've bumped the delay to 250ms to see if no keys are dropped now.

I don't really have any intention on supporting extended ascii. None of those characters have real scan codes. You find me the exact scan codes to send to an input device to generate each individual character and I'll consider adding them, but note this would also complicate the original elegance of this program and would probably require a rewrite.
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby b-rad.cc » Mon May 30, 2011 2:36 pm

*BUMP*

updated app.bin, renamed to virtualkeyboard.app.bin

delete the old fakekbd.app.bin and try this new one out...it includes a fully functional webend keyboard now :mrgreen:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: USB Fake Keyboard   

Postby b-rad.cc » Mon May 30, 2011 5:30 pm

*BUMP*

updated web keyboard.
- styled to maximize view on an 800x480 screen...aka my epic 4g :ugeek:
- added arrow keys, home, and escape/back
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Next

Return to WDLXTV-G2 & WDLXTV-Live/Plus app.bins

Who is online

Users browsing this forum: No registered users and 2 guests