maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   i just KNOW this could work... (https://talk.maemo.org/showthread.php?t=50927)

festivalnut 2010-04-24 17:56

Re: i just KNOW this could work...
 
Quote:

Originally Posted by pantera1989 (Post 626143)
I don't think a plugin would work. For one thing it is closed source so you can't possibly make the existing pad invoke the plugin. For another, even if you somehow make this work..the pad has nothing to do with the on-screen qwerty or with text input whatsoever.

but could the plug in invoke the pad? say desktop icon opens pad and background app to pickup keypresses?

or even very very simple, (to the point of impractical just for starters) numeric keypad still inserts numbers, sends via plugin to external app, external app converts string of numbers to text? would require space (0) between every letter and double space (00) to indicate actual space(_)... just thinking out loud at this point...

440330555055506660060203306066600111

...lmao maybe not...

omeriko9 2010-04-24 18:27

Re: i just KNOW this could work...
 
Quote:

Originally Posted by festivalnut (Post 626159)
but could the plug in invoke the pad? say desktop icon opens pad and background app to pickup keypresses?

or even very very simple, (to the point of impractical just for starters) numeric keypad still inserts numbers, sends via plugin to external app, external app converts string of numbers to text? would require space (0) between every letter and double space (00) to indicate actual space(_)... just thinking out loud at this point...

440330555055506660060203306066600111

...lmao maybe not...

The failure point in this theory is that the native dial pad needs to know about the incoming text from the plugin (that have been converted from numbers). Because the dial pad currently lacks the ability to know about this kind of information, and it's a closed source software, it cannot be altered to know about the converted numbers. Therefor the only solution I see here is to override the current dial pad with a different app, but even that would not be a natural replacement of the dial pad.

festivalnut 2010-04-24 18:38

Re: i just KNOW this could work...
 
oh i wasn't suggesting sending back to the pad there, just use the pad as an output and let the other app handle it from there, like i said very impractical anyway. so it looks like the dream is dead for now then? :(

whats the chances of convincing nokia to release the code?

omeriko9 2010-04-24 19:02

Re: i just KNOW this could work...
 
Quote:

Originally Posted by festivalnut (Post 626207)
oh i wasn't suggesting sending back to the pad there, just use the pad as an output and let the other app handle it from there

Using the pad as an output means sending something TO the pad, if I'm following - therefor the pad needs to know about incoming messages (=plugin)...

Quote:

Originally Posted by festivalnut (Post 626207)
whats the chances of convincing nokia to release the code?

I think it's the same percentage as for Nokia's economical gain from releasing the source...

festivalnut 2010-04-24 19:06

Re: i just KNOW this could work...
 
Quote:

Originally Posted by omeriko9 (Post 626222)

I think it's the same percentage as for Nokia's economical gain from releasing the source...

so good then? overcoming a major objection to many potential buyers has to be good for the bottom line, no?

pantera1989 2010-04-24 19:46

Re: i just KNOW this could work...
 
Quote:

Originally Posted by festivalnut (Post 626159)
but could the plug in invoke the pad? say desktop icon opens pad and background app to pickup keypresses?

or even very very simple, (to the point of impractical just for starters) numeric keypad still inserts numbers, sends via plugin to external app, external app converts string of numbers to text? would require space (0) between every letter and double space (00) to indicate actual space(_)... just thinking out loud at this point...

440330555055506660060203306066600111

...lmao maybe not...

This technically could work. But it would be inpractical. And it would require a lot of work. If you invoke the pad, the keypresses it releases might still be linked to the phone app.

Even if you capture those keys and program a plugin to interpret 222 as 'c' for example and recognize pauses so it would be like a T9 entry system, there is no way to determine if the app is also sending out other types of signals. You can't know unless you know the source and/or monitor every event that happens when you press a number.

It would be much easier to design the whole thing yourself. The problem is with portrait mode. How to force text to be portrait. Making the buttons is simple enough and programming them to respond as they should will not be very difficult. You could create large buttons as a new qwerty layout and write 2/abc, 3/def and whatever. You can write those in portrait mode so the numbers will be legible when holding the phone in portrait mode. The layout is the easiest thing. But even if you do that right, and program the thing right, the text will still be in landscape mode. That is the main problem.

festivalnut 2010-04-24 20:04

Re: i just KNOW this could work...
 
@pantera

thanks, i had kinda reached that conclusion and dived into the "learn python in 30 mins" thread ran about blindly placing buttons and messing with things i dont understand and spent half the time thinking "but how do i even rotate the text?"

it looks like nobody's ready to adopt the project atm, and i'll have to learn sooooo much to even attempt this myself, very daunting! i wouldn't even mind the text displaying in landscape as a stop gap for now, okay its ugly and impractical but its one step closer all the same!

rachol 2010-04-24 22:45

Re: i just KNOW this could work...
 
Well, maybe when I can find some time, I could manage something.

*In previous years I have developed virtual keyboard for linux
*in current project I have implementing message sending and receiving

So 2 solutions I could propose:
*port my virtual keyboard and activate/disable it with power button
*write SMS application for portrait mode

However, you would have to wait at least a month for it, I have no time currently to do any of those:)

I should not even be checking this forum, damn it!! :D

ossipena 2010-04-27 18:03

Re: i just KNOW this could work...
 
1 Attachment(s)
i made entire app from zero. now I have working UI and problem how to get text input working. I have some ideas I am testing actively. now it only prints "aaaaaa" when I tap button number 1 ;)

there is a contact dialog (that gives the name instead of number for now but hey the dialog is working).

heres one screenshot. yes, backspace is missing

aspidites 2010-04-27 18:16

Re: i just KNOW this could work...
 
Quote:

Originally Posted by ossipena (Post 630261)
i made entire app from zero. now I have working UI and problem how to get text input working. I have some ideas I am testing actively. now it only prints "aaaaaa" when I tap button number 1 ;)

there is a contact dialog (that gives the name instead of number for now but hey the dialog is working).

heres one screenshot. yes, backspace is missing

I don't see a screenshot... I see it now.

Anyways, as for the "aaaaaa" what about keeping a global variable (or class attribute) that keeps track of the number of sequential presses?

Something like:
Code:

sequential_presses  = 0
last_key_pressed = None

on_key_press(key):
  if key == last_key_pressed:
    seuqential_presses +=1
  else:
    sequential_presses = 1
    last_key_pressed = key

  if sequential_presses == 1:
    ..
  elif sequential_presses == 2:
    ..

Of course, using something like this would be more pythonic than the if/elif clauses. I don't know what toolkit you're using, so it's hard to give concrete examples. Also, it might be worth using ord() or char() instead of manually having to figure out which character needs to be displayed.

BTW, space is usually the 0 key, isn't it? Might help if each key had the letters it can input under them in a smaller font. Looking good so far though.

edit:
Just another idea:
Code:

letters = {}
letters[2] = [_, 'a', 'b', 'c']
letters[3] = [_, 'd', 'e', 'f']

print letters[key][sequential_presses]

The names are verbose just to convey my ideas. Also, the _ is used so that you don't have to do something like "sequential_presses - 1" when doing index referencing.


All times are GMT. The time now is 05:37.

vBulletin® Version 3.8.8