Tweak NO. 3 : Polish characters on Nokia SU-8W
10Feb09
It’s a trick that makes posible to write polish characters on your mobile in Python editor using Nokia SU-8W. All that’s needed is PyS60 installed with appuifw2 module.
To write a polish letter press Alt Gr + Key, where Key is the usual key under which polish character is hiden.
Few things that I could not ommit – the letter “ź” is under key “q” instead of “x” and the capital letter “Ć” is under “W” instead of “C”
Use with the default “UK, US English” layout.
And here’s the pys60 code of the editor:
#Coded by Ranza from Ranza's Research
#published using GNUv3
#http://masteranza.wordpress.com
import key_codes, e32, appuifw2
app_lock=e32.Ao_lock()
def exit():
app_lock.signal()
appuifw2.app.exit_key_handler=exit
def capt(where,add):
if (add>0):
text.move(1, select=True)
#a
if (text.get_selection()[2]==u"\u00E1"):
text.cut()
text.insert(pos=where,text=u"\u0105")
#s
elif (text.get_selection()[2]==u"\u00DF"):
text.cut()
text.insert(pos=where,text=u"\u015b")
#c
elif (text.get_selection()[2]==u"\u00a9"):
text.cut()
text.insert(pos=where,text=u"\u0107")
#e
elif (text.get_selection()[2]==u"\u00e9"):
text.cut()
text.insert(pos=where,text=u"\u0119")
#l
elif (text.get_selection()[2]==u"\u00F8"):
text.cut()
text.insert(pos=where,text=u"\u0142")
#n
elif (text.get_selection()[2]==u"\u00f1"):
text.cut()
text.insert(pos=where,text=u"\u0144")
#z
elif (text.get_selection()[2]==u"\u00e6"):
text.cut()
text.insert(pos=where,text=u"\u017c")
#z`
elif (text.get_selection()[2]==u"\u00e4"):
text.cut()
text.insert(pos=where,text=u"\u017a")
#A
elif (text.get_selection()[2]==u"\u00c1"):
text.cut()
text.insert(pos=where,text=u"\u0104")
#C, tricky one
elif (text.get_selection()[2]==u"\u00C5"):
text.cut()
text.insert(pos=where,text=u"\u0106")
#E
elif (text.get_selection()[2]==u"\u00c9"):
text.cut()
text.insert(pos=where,text=u"\u0118")
#L
elif (text.get_selection()[2]==u"\u00D8"):
text.cut()
text.insert(pos=where,text=u"\u0141")
#N
elif (text.get_selection()[2]==u"\u00D1"):
text.cut()
text.insert(pos=where,text=u"\u0143")
#S
elif (text.get_selection()[2]==u"\u00a7"):
text.cut()
text.insert(pos=where,text=u"\u015a")
#Z
elif (text.get_selection()[2]==u"\u00c6"):
text.cut()
text.insert(pos=where,text=u"\u017b")
#Z`
elif (text.get_selection()[2]==u"\u00c4"):
text.cut()
text.insert(pos=where,text=u"\u0179")
text.clear_selection()
text.move(2)
text=appuifw2.Text(edit_callback=capt)
appuifw2.app.body=text
app_lock.wait()
Well this is not the best solution I’ve invented, but it’s all I could do. I’ve been searching all over internet for hours, trying things to make those characters work everywhere on the phone, but with no success.
Filed under: Informatics, Mobile, Nokia N95, Nokia N95 8GB, Nokia SU-8W, pys60, Python, Tweaks | 1 Comment
Tags: character, layout, polish, pys60, s60, su-8w
شكرا شكرا