XBMC Symbian S60 Remote v2 - unofficial third-party XBMC Remote Control for Symbian
#31
yukistvn Wrote:dear Ezzemo, thanks for your code, program work fine with navigation only ( my mobile keyboard E 72 is Qwety)
i tried to modifying for my S60 V 3 , by change the Ekey 1 - 9 to the numkey, it work ok, but if i assign to the other key there is no action , do you have any idea to help me
thanks in advance.
MaxMustermann: i get keys_code from your Python script, it's helpfull, if you have any idea, pls help me anyway!. your remote script dont seem error by code.

Did you try MaxMustermanns code? (it´s on the 2nd page of this thread)
He did it for a qwerty phone: E61
Try the code to detect the keypress and then assign that.

Good luck.

Ezzemo
Reply
#32
Thanks you Ezzemo for the script! Love the remote!

Working perfectly on my E51.
Reply
#33
Thumbs Up 
Thank you very much for your work, Ezzemo! Gracias!

It works fine with a 5730 XM Wink
Reply
#34
Am I right in thinking that for non touch screen phones the theme is just a pretty picture, it serves no functional purpose and if so can I go ahead and make a picture that lists the command shortcuts instead

This would be for the qwerty keyboard version

Anything I need to look out for on the image, size attributes etc?



Regards


John
Reply
#35
Quick update

E63 bombs out with a syntax error on the qwerty version somewhere around "hotkeys.get(sc,lambda: print 'Not assigned')()"

John
Reply
#36
Ezzemo Wrote:Simple Python Based Remote control for XBMC.

Requires Wifi and a Symbian S60 3rd Edition Phone.

Screenshots:
Image Image

Download: http://www.mediafire.com/file/5j83on99cc...motev2.rar

PIPs Installer: http://www.megaupload.com/?d=IF16BWHY (you might also need it)

******************
**HOW TO INSTALL**
******************
  • Copy RAR contents to a folder.
  • Connect phone to PC in PCSuite Mode.
  • Install on Phone (using PC Suite or Similar):
    Python_2.0.0.sis
    PythonScriptShell_2.0.0_931-9.4.sis
    PIPs Installer 1.6 (if you don't have it already)
  • Modify XBMCRemotev2.py to set your default server address (open file with notepad and change IPTongueort on line 4)
  • Create Folder on the memory card on the phone named Python
  • Upload to recently created e:/Python:
    XBMCRemotev2.py
    bkg.png
    bkg2.png
  • Disconnect phone.
  • Make sure XBMC is on and HTTP Enabled: Settings->Network->Services->Allow control of XBMC via HTTP
  • Run Python2.0.0 (under aplications)
  • Select Options -> Run and select XBMCRemotev2.py
  • Use butons to control XBMC according to the image displayed.

************
**COMMANDS**
************

? : Set Host, change Theme or Exit
i : View movie information
* : Options Menu (on movie menu or while playing)
x : exit
C : Return

[+]: change Aspect Ratio (during movie)
[/]: Toogle Windowed or Fullscreen Mode
S : Toogle Subtitles on/off

Also: Play, Pause, Stop, FastForward, Rewind, Next, Previous, VolumeUp, VolumeDown, Mute


********************************************
Improvements:
  • The pythons scrip now works on key events, it is more CPU friendly and will not run out your battery.
  • More KeyOptions.
  • Visual display of commands
  • "Themes" supported


*********************************************
Known Problems or issues:
  • It will take some seconds to send the first keys.
  • If the cellphone is in standby it will take 2 key press to send command. the first to wake up.
  • I will not save your changed server adress.
  • You have to open python first to access the program. (a Sis programa can be created in the future)


****************************************

Tested on Nokia N85 using XBMC Dharma beta 2

Should work on:
Nokia N78, N79, N81, N82, N85, N86, N95, N96, E51, E55, E71, E72, E75, Samsung GT-I7110 and maybe some others.

Better than using the Iphone since you don't have to look at the screen, you can feel the keyboard.


Enjoy,
Ezzemo

Hi Ezzemo,

and thank you!

I manage to run your application on a Nokia E7-00 Symbian^3 device S60 5th Edition.

I had to change one path in order for it work, plus I changed the commands the way I like them Smile

little howto:

In the main XBMC window, choose SYSTEM then Network then Services
Check "Allow control of XBMC via HTTP"
Check "Allow programs on this system to control XBMC"
Check "Allow programs on other systems to control XBMC"

Then download Python at https://garage.maemo.org/projects/pys60
Today the file to download is:
https://garage.maemo.org/frs/download.ph...0.0.tar.gz

but check to see if there is a newer one.

Then install on your phone:
Python_2.0.0.sis
and
PythonScriptShell_2.0.0_high_capas.sis

Then copy the Python script and the two images on the phone in the folder C:\data\python

Since the keyboard is totally different in the E7 the pictures don't make much sense. I change the picture with an image that reminds the meaning of each key such as:

Code:
Left = left key
Right = right key
Up = up key
Down = down key
Backspace / 1 = esc
Enter / 2 = enter
3 = switch off
4 = toggle menu
5 = volume up
6 = volume down
Space / 7 = play / pause
8 = stop
9 = mute
0 = full screen


the Python script is difficult to write, but easy to understand, so you can customize it as you like.

you need to modify for example the strings like this one:

Code:
canvas.bind(EKey1,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF01B)'))

to be able to change these line, you need three references.

The first tells you which keys you can intercept on Python for S60:
http://people.csail.mit.edu/rudolph/Teac..._1_3_1.pdf

I'll also copy them here, in case the file disappear:

Code:
Key Keycode Scancode
1. EKeyLeftSoftkey EScancodeLeftSoftkey
2. EKeyYes EScancodeYes
3. EKeyMenu EScancodeMenu
4. EKey0...9 EScancode0...9
5. EKeyStar EScancodeStar
6. EKeyLeftArrow EScancodeLeftArrow
7. EKeyUpArrow EScancodeUpArrow
8. EKeySelect EScancodeSelect
9. EKeyRightArrow EScancodeRightArrow
10. EKeyDownArrow EScancodeDownArrow
11. EKeyRightSoftkey EScancodeRightSoftkey
12. EKeyNo EScancodeNo
13. EKeyBackspace EScancodeBackspace
14. EKeyEdit EScancodeEdit
15. EKeyHash EScancodeHash

the second reference tells you what kind of commands you can send to XBMC:
http://xbmc.svn.sourceforge.net/viewvc/x...iew=markup

and for the action list, you can look here:
http://wiki.xbmc.org/?title=Keymap.xml#Actions

and if you want to send KEY_ASCII keys, you need to know the values! Here:
http://groups.google.com/group/commandfu...e486?pli=1
http://voxcommando.com/forum/index.php?topic=104.0;wap2

and I will also copy them directly here:

Code:
space = SendKey(61472) 0xF020
singlequote = SendKey(61662) 0xF0EE
, = SendKey(61628) 0xF0BC
- = SendKey(61629) 0xF0BD
. = SendKey(61630) 0xF0BE
/ = SendKey(61631) 0xF0BF
0 = SendKey(61488) 0xF030
1 = SendKey(61489) 0xF031
2 = SendKey(61490) 0xF032
3 = SendKey(61491) 0xF033
4 = SendKey(61492) 0xF034
5 = SendKey(61493) 0xF035
6 = SendKey(61494) 0xF036
7 = SendKey(61495) 0xF037
8 = SendKey(61496) 0xF038
9 = SendKey(61497) 0xF039
; = SendKey(61626) 0xF0BA
equals = SendKey(61627) 0xF0BB
A = SendKey(61505) 0xF041
B = SendKey(61506) 0xF042
C = SendKey(61507) 0xF043
D = SendKey(61508) 0xF044
E = SendKey(61509) 0xF045
F = SendKey(61510) 0xF046
G = SendKey(61511) 0xF047
H = SendKey(61512) 0xF048
I = SendKey(61513) 0xF049
J = SendKey(61514) 0xF04A
K = SendKey(61515) 0xF04B
L = SendKey(61516) 0xF04C
M = SendKey(61517) 0xF04D
N = SendKey(61518) 0xF04E
O = SendKey(61519) 0xF04F
P = SendKey(61520) 0xF050
Q = SendKey(61521) 0xF051
R = SendKey(61522) 0xF052
S = SendKey(61523) 0xF053
T = SendKey(61524) 0xF054
U = SendKey(61525) 0xF055
V = SendKey(61526) 0xF056
W = SendKey(61527) 0xF057
X = SendKey(61528) 0xF058
Y = SendKey(61529) 0xF059
Z = SendKey(61530) 0xF05A
[ = SendKey(61659) 0xF0DB
\ = SendKey(61660) 0xF0DC
] = SendKey(61661) 0xF0DD
_ = SendKey(61629) 0xF0BD
` = SendKey(61632) 0xF0C0
backspace = SendKey(61448) 0xF008
enter = SendKey(61453) 0xF00D
tab = SendKey(61449) 0xF009
control = SendKey(61457) 0xF011
alt = SendKey(61458) 0xF012
pausebreak = SendKey(61459) 0xF013
capslock = SendKey(61460) 0xF014
esc = SendKey(61467) 0xF01B
pageup = SendKey(61473) 0xF021
pagedown = SendKey(61474) 0xF022
end = SendKey(61475) 0xF023
home = SendKey(61476) 0xF024
leftarrow = SendKey(61477) 0xF025
uparrow = SendKey(61478) 0xF026
rightarrow = SendKey(61479) 0xF027
downarrow = SendKey(61480) 0xF028
printscreen = SendKey(61484) 0xF02C
insert = SendKey(61485) 0xF02D
delete = SendKey(61486) 0xF02E
window = SendKey(61531) 0xF05B
F1 = SendKey(61552) 0xF070
F2 = SendKey(61553) 0xF071
F3 = SendKey(61554) 0xF072
F4 = SendKey(61555) 0xF073
F5 = SendKey(61556) 0xF074
F6 = SendKey(61557) 0xF075
F7 = SendKey(61558) 0xF076
F8 = SendKey(61559) 0xF077
F9 = SendKey(61560) 0xF078
F10 = SendKey(61561) 0xF079
F11 = SendKey(61562) 0xF07A
F12 = SendKey(61563) 0xF07B
numlock = SendKey(61584) 0xF090

So finally my script looks like this:

see next post, the forum complains I wrote too much!

Thank you!!!
Reply
#37
And so, this is the modified script:

Please remember to edit the line:

xbmc = u"192.168.1.1:8080"

with your own xbmc box IP!!!

Code:
# XBMC Remote v2
# with Events (less resource consumming)

# default ip:port
xbmc = u"192.168.1.1:8080"

# background image route
background = u'c:\\data\\Python\\bkg.png'


import appuifw
from graphics import *
import globalui
import e32
from key_codes import *
import urllib2

keyboard_state={}
last_keycode=0
def exit_btn_cmd():
    urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(OSD)')
    urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(ContextMenu)')
    
#Imagen de fondo
def set_theme():
    global bkg_img
    bkg_img = Image.open(background)
    handle_redraw(())
    
def handle_redraw(rect):
    global bkg_img
    if bkg_img:
        canvas.blit(bkg_img)
        
def optionsHost():
    global xbmc
    xbmc = appuifw.query(u"Set xbmc host:port", "text", xbmc)
    
def optionsTheme():
    global background
    background = appuifw.query(u"Set Theme", "text", background)
    set_theme()

def quit():
    appuifw.app.set_exit()

appuifw.app.menu = [(u"Set XBMC host", optionsHost), (u"Set Theme", optionsTheme), (u"Exit", quit)]

appuifw.app.exit_key_handler=exit_btn_cmd

appuifw.app.screen='full'
appuifw.app.title=u'S60 XBMC Remote'

# use the appuifw.Canvas function and as "event_callback" put "
# keyboard.handle_event", a function which does the keyboard scan
canvas=appuifw.Canvas(redraw_callback=handle_redraw)

# set the application body to canvas
appuifw.app.body=canvas


# commands

#Left
canvas.bind(EKeyLeftArrow,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF025)'))

#Right
canvas.bind(EKeyRightArrow,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF027)'))

#Down
canvas.bind(EKeyDownArrow,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF028)'))

#Up
canvas.bind(EKeyUpArrow,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF026)'))

#Select
canvas.bind(EKeySelect,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF020)'))

#Backspace
#canvas.bind(EKeyBackspace,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(257)'))


canvas.bind(EKeyYes,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(Info)'))

canvas.bind(EKeyNo,lambda:quit())

#canvas.bind(EKey1,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(Rewind)'))
# Esc Key
canvas.bind(EKey1,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF01B)'))
canvas.bind(EStdKeyBackspace,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF01B)'))

#canvas.bind(EKey2,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(FastForward)'))
# Enter Key
canvas.bind(EKey2,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF00D)'))
canvas.bind(EKeyEnter,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF00D)'))

# Switch off app
canvas.bind(EKey3,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF053)'))

# canvas.bind(EKey4,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(AspectRatio)'))
canvas.bind(EKey4,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=sendKey(0xF009)'))
        
canvas.bind(EKey5,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(VolumeUp)'))
        
canvas.bind(EKey6,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(VolumeDown)'))

canvas.bind(EKey7,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(Play)'))
canvas.bind(EKeySpace,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(Play)'))
        
canvas.bind(EKey8,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(Stop)'))
        
canvas.bind(EKey9,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(Mute)'))    
        
canvas.bind(EKeyStar,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(AspectRatio)'))
        
canvas.bind(EKey0,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=action(199)'))

canvas.bind(EKeyHash,lambda:urllib2.urlopen('http://'+xbmc+'/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Action(ShowSubtitles)'))    

lock=e32.Ao_lock()

set_theme()

appuifw.app.exit_key_handler=lock.signal

lock.wait()
Reply
#38
I looked at MaxMustermann solution to map the other keys here:
http://forum.xbmc.org/showpost.php?p=635...stcount=17

but unfortunately its script doesn't work on the E7 (just a white image on the screen when I press keys) but thanks to his help I found out an extensive map of keys:

http://www.developer.nokia.com/Community...post663681

I will copy it here. I'm not sure which are recognized on the E7:

Code:
EKeyNull = 0x0000
EKeyBell = 0x0007
EKeyBackspace = 0x0008
EKeyTab = 0x0009
EKeyLineFeed = 0x000a
EKeyVerticalTab = 0x000b
EKeyFormFeed = 0x000c
EKeyEnter = 0x000d
EKeyEscape = 0x001b
EKeySpace = 0x0020
EKeyDelete = 0x007f
EKeyPrintScreen = 0xf800
EKeyPause = 0xf801
EKeyHome = 0xf802
EKeyEnd = 0xf803
EKeyPageUp = 0xf804
EKeyPageDown = 0xf805
EKeyInsert = 0xf806
EKeyLeftArrow = 0xf807
EKeyRightArrow = 0xf808
EKeyUpArrow = 0xf809
EKeyDownArrow = 0xf80a
EKeyLeftShift = 0xf80b
EKeyRightShift = 0xf80c
EKeyLeftAlt = 0xf80d
EKeyRightAlt = 0xf80e
EKeyLeftCtrl = 0xf80f
EKeyRightCtrl = 0xf810
EKeyLeftFunc = 0xf811
EKeyRightFunc = 0xf812
EKeyCapsLock = 0xf813
EKeyNumLock = 0xf814
EKeyScrollLock = 0xf815
EKeyF1 = 0xf816
EKeyF2 = 0xf817
EKeyF3 = 0xf818
EKeyF4 = 0xf819
EKeyF5 = 0xf81a
EKeyF6 = 0xf81b
EKeyF7 = 0xf81c
EKeyF8 = 0xf81d
EKeyF9 = 0xf81e
EKeyF10 = 0xf81f
EKeyF11 = 0xf820
EKeyF12 = 0xf821
EKeyF13 = 0xf822
EKeyF14 = 0xf823
EKeyF15 = 0xf824
EKeyF16 = 0xf825
EKeyF17 = 0xf826
EKeyF18 = 0xf827
EKeyF19 = 0xf828
EKeyF20 = 0xf829
EKeyF21 = 0xf82a
EKeyF22 = 0xf82b
EKeyF23 = 0xf82c
EKeyF24 = 0xf82d
EKeyOff = 0xf82e
EKeyIncContrast = 0xf82f
EKeyDecContrast = 0xf830
EKeyBacklightOn = 0xf831
EKeyBacklightOff = 0xf832
EKeyBacklightToggle = 0xf833
EKeySliderDown = 0xf834
EKeySliderUp = 0xf835
EKeyMenu = 0xf836
EKeyDictaphonePlay = 0xf837
EKeyDictaphoneStop = 0xf838
EKeyDictaphoneRecord = 0xf839
EKeyHelp = 0xf83a
EKeyDial = 0xf83b
EKeyScreenDimension0 = 0xf83c
EKeyScreenDimension1 = 0xf83d
EKeyScreenDimension2 = 0xf83e
EKeyScreenDimension3 = 0xf83f
EKeyIncVolume = 0xf840
EKeyDecVolume = 0xf841
EKeyDevice0 = 0xf842
EKeyDevice1 = 0xf843
EKeyDevice2 = 0xf844
EKeyDevice3 = 0xf845
EKeyDevice4 = 0xf846
EKeyDevice5 = 0xf847
EKeyDevice6 = 0xf848
EKeyDevice7 = 0xf849
EKeyDevice8 = 0xf84a
EKeyDevice9 = 0xf84b
EKeyDeviceA = 0xf84c
EKeyDeviceB = 0xf84d
EKeyDeviceC = 0xf84e
EKeyDeviceD = 0xf84f
EKeyDeviceE = 0xf850
EKeyDeviceF = 0xf851
EKeyApplication0 = 0xf852
EKeyApplication1 = 0xf853
EKeyApplication2 = 0xf854
EKeyApplication3 = 0xf855
EKeyApplication4 = 0xf856
EKeyApplication5 = 0xf857
EKeyApplication6 = 0xf858
EKeyApplication7 = 0xf859
EKeyApplication8 = 0xf85a
EKeyApplication9 = 0xf85b
EKeyApplicationA = 0xf85c
EKeyApplicationB = 0xf85d
EKeyApplicationC = 0xf85e
EKeyApplicationD = 0xf85f
EKeyApplicationE = 0xf860
EKeyApplicationF = 0xf861
EKeyYes = 0xf862
EKeyNo = 0xf863
EKeyIncBrightness = 0xf864
EKeyDecBrightness = 0xf865
EKeyKeyboardExtend = 0xf866
EKeyDevice10 = 0xf87
EKeyDevice11 = 0xf88
EKeyDevice12 = 0xf89
EKeyDevice13 = 0xf8a
EKeyDevice14 = 0xf8b
EKeyDevice15 = 0xf8c
EKeyDevice16 = 0xf8d
EKeyDevice17 = 0xf8e
EKeyDevice18 = 0xf8f
EKeyDevice19 = 0xf90
EKeyDevice1A = 0xf91
EKeyDevice1B = 0xf92
EKeyDevice1C = 0xf93
EKeyDevice1D = 0xf94
EKeyDevice1E = 0xf95
EKeyDevice1F = 0xf96
EKeyApplication10 = 0xf97
EKeyApplication11 = 0xf98
EKeyApplication12 = 0xf99
EKeyApplication13 = 0xf9a
EKeyApplication14 = 0xf9b
EKeyApplication15 = 0xf9c
EKeyApplication16 = 0xf9d
EKeyApplication17 = 0xf9e
EKeyApplication18 = 0xf9f
EKeyApplication19 = 0xfa0
EKeyApplication1A = 0xfa1
EKeyApplication1B = 0xfa2
EKeyApplication1C = 0xfa3
EKeyApplication1D = 0xfa4
EKeyApplication1E = 0xfa5
EKeyApplication1F = 0xfa6

EStdKeyNull=0x00
EStdKeyBackspace=0x01
EStdKeyTab=0x02
EStdKeyEnter=0x03
EStdKeyEscape=0x04
EStdKeySpace=0x05
EStdKeyPrintScreen=0x06
EStdKeyPause=0x07
EStdKeyHome=0x08
EStdKeyEnd=0x09
EStdKeyPageUp=0x0a
EStdKeyPageDown=0x0b
EStdKeyInsert=0x0c
EStdKeyDelete=0x0d
EStdKeyLeftArrow=0x0e
EStdKeyRightArrow=0x0f
EStdKeyUpArrow=0x10
EStdKeyDownArrow=0x11
EStdKeyLeftShift=0x12
EStdKeyRightShift=0x13
EStdKeyLeftAlt=0x14
EStdKeyRightAlt=0x15
EStdKeyLeftCtrl=0x16
EStdKeyRightCtrl=0x17
EStdKeyLeftFunc=0x18
EStdKeyRightFunc=0x19
EStdKeyCapsLock=0x1a
EStdKeyNumLock=0x1b
EStdKeyScrollLock=0x1c
EStdKeyF1=0x60
EStdKeyF2=0x61
EStdKeyF3=0x62
EStdKeyF4=0x63
EStdKeyF5=0x64
EStdKeyF6=0x65
EStdKeyF7=0x66
EStdKeyF8=0x67
EStdKeyF9=0x68
EStdKeyF10=0x69
EStdKeyF11=0x6a
EStdKeyF12=0x6b
EStdKeyF13=0x6c
EStdKeyF14=0x6d
EStdKeyF15=0x6e
EStdKeyF16=0x6f
EStdKeyF17=0x70
EStdKeyF18=0x71
EStdKeyF19=0x72
EStdKeyF20=0x73
EStdKeyF21=0x74
EStdKeyF22=0x75
EStdKeyF23=0x76
EStdKeyF24=0x77
EStdKeyXXX=0x78
EStdKeyComma=0x79
EStdKeyFullStop=0x7a
EStdKeyForwardSlash=0x7b
EStdKeyBackSlash=0x7c
EStdKeySemiColon=0x7d
EStdKeySingleQuote=0x7e
EStdKeyHash=0x7f
EStdKeySquareBracketLeft=0x80
EStdKeySquareBracketRight=0x81
EStdKeyMinus=0x82
EStdKeyEquals=0x83
EStdKeyNkpForwardSlash=0x84
EStdKeyNkpAsterisk=0x85
EStdKeyNkpMinus=0x86
EStdKeyNkpPlus=0x87
EStdKeyNkpEnter=0x88
EStdKeyNkp1=0x89
EStdKeyNkp2=0x8a
EStdKeyNkp3=0x8b
EStdKeyNkp4=0x8c
EStdKeyNkp5=0x8d
EStdKeyNkp6=0x8e
EStdKeyNkp7=0x8f
EStdKeyNkp8=0x90
EStdKeyNkp9=0x91
EStdKeyNkp0=0x92
EStdKeyNkpFullStop=0x93
EStdKeyMenu=0x94
EStdKeyBacklightOn=0x95
EStdKeyBacklightOff=0x96
EStdKeyBacklightToggle=0x97
EStdKeyIncContrast=0x98
EStdKeyDecContrast=0x99
EStdKeySliderDown=0x9a
EStdKeySliderUp=0x9b
EStdKeyDictaphonePlay=0x9c
EStdKeyDictaphoneStop=0x9d
EStdKeyDictaphoneRecord=0x9e
EStdKeyHelp=0x9f
EStdKeyOff=0xa0
EStdKeyDial=0xa1
EStdKeyIncVolume=0xa2
EStdKeyDecVolume=0xa3
EStdKeyDevice0=0xa4
EStdKeyDevice1=0xa5
EStdKeyDevice2=0xa6
EStdKeyDevice3=0xa7
EStdKeyDevice4=0xa8
EStdKeyDevice5=0xa9
EStdKeyDevice6=0xaa
EStdKeyDevice7=0xab
EStdKeyDevice8=0xac
EStdKeyDevice9=0xad
EStdKeyDeviceA=0xae
EStdKeyDeviceB=0xaf
EStdKeyDeviceC=0xb0
EStdKeyDeviceD=0xb1
EStdKeyDeviceE=0xb2
EStdKeyDeviceF=0xb3
EStdKeyApplication0=0xb4
EStdKeyApplication1=0xb5
EStdKeyApplication2=0xb6
EStdKeyApplication3=0xb7
EStdKeyApplication4=0xb8
EStdKeyApplication5=0xb9
EStdKeyApplication6=0xba
EStdKeyApplication7=0xbb
EStdKeyApplication8=0xbc
EStdKeyApplication9=0xbd
EStdKeyApplicationA=0xbe
EStdKeyApplicationB=0xbf
EStdKeyApplicationC=0xc0
EStdKeyApplicationD=0xc1
EStdKeyApplicationE=0xc2
EStdKeyApplicationF=0xc3
EStdKeyYes=0xc4
EStdKeyNo=0xc5
EStdKeyIncBrightness=0xc6
EStdKeyDecBrightness=0xc7
EStdKeyKeyboardExtend=0xc8
EStdKeyDevice10=0xc9
EStdKeyDevice11=0xca
EStdKeyDevice12=0xcb
EStdKeyDevice13=0xcc
EStdKeyDevice14=0xcd
EStdKeyDevice15=0xce
EStdKeyDevice16=0xcf
EStdKeyDevice17=0xd0
EStdKeyDevice18=0xd1
EStdKeyDevice19=0xd2
EStdKeyDevice1A=0xd3
EStdKeyDevice1B=0xd4
EStdKeyDevice1C=0xd5
EStdKeyDevice1D=0xd6
EStdKeyDevice1E=0xd7
EStdKeyDevice1F=0xd8
EStdKeyApplication10=0xd9
EStdKeyApplication11=0xda
EStdKeyApplication12=0xdb
EStdKeyApplication13=0xdc
EStdKeyApplication14=0xdd
EStdKeyApplication15=0xde
EStdKeyApplication16=0xdf
EStdKeyApplication17=0xe0
EStdKeyApplication18=0xe1
EStdKeyApplication19=0xe2
EStdKeyApplication1A=0xe3
EStdKeyApplication1B=0xe4
EStdKeyApplication1C=0xe5
EStdKeyApplication1D=0xe6
EStdKeyApplication1E=0xe7
EStdKeyApplication1F=0xe8

# The following are not included in the Symbian headers.
EKey0 = 0x30
EKey1 = 0x31
EKey2 = 0x32
EKey3 = 0x33
EKey4 = 0x34
EKey5 = 0x35
EKey6 = 0x36
EKey7 = 0x37
EKey8 = 0x38
EKey9 = 0x39
EKeyStar = 0x2a
EKeyHash = 0x23
EKeyLeftSoftkey = EKeyDevice0
EKeyRightSoftkey = EKeyDevice1
EKeySelect = EKeyDevice3
EKeyEdit = EKeyLeftShift
EKeyMenu = EKeyApplication0

EScancode0=0x30
EScancode1=0x31
EScancode2=0x32
EScancode3=0x33
EScancode4=0x34
EScancode5=0x35
EScancode6=0x36
EScancode7=0x37
EScancode8=0x38
EScancode9=0x39
EScancodeStar=0x2a
EScancodeHash=0x7f
EScancodeBackspace=0x01
EScancodeLeftSoftkey=EStdKeyDevice0
EScancodeRightSoftkey=EStdKeyDevice1
EScancodeSelect=0xa7
EScancodeYes=0xc4
EScancodeNo=0xc5
EScancodeLeftArrow=0xe
EScancodeRightArrow=0xf
EScancodeUpArrow=0x10
EScancodeDownArrow=0x11
EScancodeEdit=EStdKeyLeftShift
EScancodeMenu=EStdKeyApplication0

# Modifiers.
EModifierAutorepeatable=0x00000001
EModifierKeypad=0x00000002
EModifierLeftAlt=0x00000004
EModifierRightAlt=0x00000008
EModifierAlt=0x00000010
EModifierLeftCtrl=0x00000020
EModifierRightCtrl=0x00000040
EModifierCtrl=0x00000080
EModifierLeftShift=0x00000100
EModifierRightShift=0x00000200
EModifierShift=0x00000400
EModifierLeftFunc=0x00000800
EModifierRightFunc=0x00001000
EModifierFunc=0x00002000
EModifierCapsLock=0x00004000
EModifierNumLock=0x00008000
EModifierScrollLock=0x00010000
EModifierKeyUp=0x00020000
EModifierSpecial=0x00040000
EModifierDoubleClick=0x00080000
EModifierPureKeycode=0x00100000
EModifierKeyboardExtend=0x00200000
EModifierCancelRotation=0x00000000
EModifierRotateBy90=0x00400000
EModifierRotateBy180=0x00800000
EModifierRotateBy270=0x01000000
EModifierPointer3DButton1=0x02000000
EModifierPointer3DButton2=0x04000000
EModifierPointer3DButton3=0x08000000
EAllModifiers=0x0fffffff

turns out the E7 comes with a script called keyviewer.py that gives you the codes of all the keys!
Just run that to know the code of keys you want to remap!

eg:

space is 32 (0x20)
enter is 13 (0xd)

and so on...
Reply
#39
Hi Ezzemo,

Thank you for your work on this symbian remote! I tried it on Nokia E71 and made some minor adjustements. The script that Ezzemo wrote is excellent. I never coded Python and i was wondering if you could improve it to sent all characters from the qwerty mobile. I tried to do that but I didn't obtained notable results. I saw that thkoe002 made here some improvements in this direction but the script is for Nokia 5800 and doesn't work on E71. From his posts I saw that he uses
Code:
sendKey(hex(0xf100+ord(letter)))
but in key_codes.py the alphanumerical characters don't exists.
What I'm trying to do is this but with Ezzemo script. So can you please help me?

Also the script has an error: if you start it and you have the XBMC system shut down(and the physical machine on witch it reside is turned off) then the application freezes. I think you have to introduce a timeout statement...


Later Edit

After some searches I found the script
Code:
import keycapture, key_codes, globalui


#Define a method to be called when a key press event occurs
def cb_key_capture(key):
    #TODO: Handle events here
    #For example, tell the user what key was pressed
    for i in dir(key_codes):
        if key == getattr(key_codes, i):
            globalui.global_note(unicode(i), 'info')
            break
    #Make the application close when the right softkey is pressed
    if key == key_codes.EKeyRightSoftkey:
        capturer.stop()

#Create a KeyCapturer object, specifying the method
capturer = keycapture.KeyCapturer(cb_key_capture)

#All keys should be captured
capturer.keys = keycapture.all_keys
#Alternatively, if only certain keys need to be handled, they can be specified as a tuple of keycodes

#Start detecting key presses
capturer.start()
witch Names all the keys on my nokia device . They are like
Code:
A-EStdKeyF2
B-EStdKeyF3
....
P-EStdKeyF17
...
V-EStdKeyF23
X-EStdKeyXXX
Y-EStdKeyComma
Z-EStdKeyFullStop
@-EModifierRightCtrl
SoftKey2(the one that is upper the NO key)-EKeyDevice1

Now I will try assigning them too.
Reply
#40
I binded al the keys on my Nokia E71 to sent to XBMC the keyboard keys that Alfonso78 specified in his post
alfonso78 Wrote:
Code:
space = SendKey(61472) 0xF020
singlequote = SendKey(61662) 0xF0EE
, = SendKey(61628) 0xF0BC
- = SendKey(61629) 0xF0BD
. = SendKey(61630) 0xF0BE
/ = SendKey(61631) 0xF0BF
0 = SendKey(61488) 0xF030
1 = SendKey(61489) 0xF031
2 = SendKey(61490) 0xF032
3 = SendKey(61491) 0xF033
4 = SendKey(61492) 0xF034
5 = SendKey(61493) 0xF035
6 = SendKey(61494) 0xF036
7 = SendKey(61495) 0xF037
8 = SendKey(61496) 0xF038
9 = SendKey(61497) 0xF039
; = SendKey(61626) 0xF0BA
equals = SendKey(61627) 0xF0BB
A = SendKey(61505) 0xF041
B = SendKey(61506) 0xF042
C = SendKey(61507) 0xF043
D = SendKey(61508) 0xF044
E = SendKey(61509) 0xF045
F = SendKey(61510) 0xF046
G = SendKey(61511) 0xF047
H = SendKey(61512) 0xF048
I = SendKey(61513) 0xF049
J = SendKey(61514) 0xF04A
K = SendKey(61515) 0xF04B
L = SendKey(61516) 0xF04C
M = SendKey(61517) 0xF04D
N = SendKey(61518) 0xF04E
O = SendKey(61519) 0xF04F
P = SendKey(61520) 0xF050
Q = SendKey(61521) 0xF051
R = SendKey(61522) 0xF052
S = SendKey(61523) 0xF053
T = SendKey(61524) 0xF054
U = SendKey(61525) 0xF055
V = SendKey(61526) 0xF056
W = SendKey(61527) 0xF057
X = SendKey(61528) 0xF058
Y = SendKey(61529) 0xF059
Z = SendKey(61530) 0xF05A
[ = SendKey(61659) 0xF0DB
\ = SendKey(61660) 0xF0DC
] = SendKey(61661) 0xF0DD
_ = SendKey(61629) 0xF0BD
` = SendKey(61632) 0xF0C0
backspace = SendKey(61448) 0xF008
enter = SendKey(61453) 0xF00D
tab = SendKey(61449) 0xF009
control = SendKey(61457) 0xF011
alt = SendKey(61458) 0xF012
pausebreak = SendKey(61459) 0xF013
capslock = SendKey(61460) 0xF014
esc = SendKey(61467) 0xF01B
pageup = SendKey(61473) 0xF021
pagedown = SendKey(61474) 0xF022
end = SendKey(61475) 0xF023
home = SendKey(61476) 0xF024
leftarrow = SendKey(61477) 0xF025
uparrow = SendKey(61478) 0xF026
rightarrow = SendKey(61479) 0xF027
downarrow = SendKey(61480) 0xF028
printscreen = SendKey(61484) 0xF02C
insert = SendKey(61485) 0xF02D
delete = SendKey(61486) 0xF02E
window = SendKey(61531) 0xF05B
F1 = SendKey(61552) 0xF070
F2 = SendKey(61553) 0xF071
F3 = SendKey(61554) 0xF072
F4 = SendKey(61555) 0xF073
F5 = SendKey(61556) 0xF074
F6 = SendKey(61557) 0xF075
F7 = SendKey(61558) 0xF076
F8 = SendKey(61559) 0xF077
F9 = SendKey(61560) 0xF078
F10 = SendKey(61561) 0xF079
F11 = SendKey(61562) 0xF07A
F12 = SendKey(61563) 0xF07B
numlock = SendKey(61584) 0xF090
and activated in XBMC under Settings/System/Input Devices the option to sent Remote Control Sent Keyboard Presses. Now all keys on my laptop keyboard are functional on my full qwerty mobile. One big problem: you can access all shortcuts but when you want to search something and you push any key on mobile they are not recognizedHuh! I don't know what's the problem and maybe someone could enlighten me! :mad:
Reply
#41
Thanks for this great script. Working great on my old Nokia N95 4MB

Edit: The Pips installer link in original post is dead [RIP megaupload], so here is an alternate download link:
http://www.mediafire.com/?te5dbmqn3m73qbu
Reply
#42
hi, i hope you still give support for this great apps...

i have e51 laying around, now i want to use it to control my xbmc box, the thing that i have done:
- installed Python_2.0.0.sis
- installed PythonScriptShell_2.0.0_931-9.4.sis
- installed PIPs Installer 1.6
- and put those 3 files (script and bkg.png) to python folder

connection to ip xbmc was successfully as i can open it through web, but when i run the script it give error message
"...SymbianError: [Errno -12]
KErrPathNotFound"

well..? anyone here can help me, thanks

Reply
#43
well-well anyone still using this phoneHuh or is it just me Sad
Reply
#44
Because in Frodo Web Server HTTP API being removed can someone "translate" python script to JSON-RPC API ?
I can't do this
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC Symbian S60 Remote v2 - unofficial third-party XBMC Remote Control for Symbian1