Re: Two finger input methods (PyGTK demos)

2007-09-05 Thread Josef Wolf
On Wed, Sep 05, 2007 at 03:53:17AM +0200, Lars Hallberg wrote:
 Josef Wolf skrev:
 On Sun, Sep 02, 2007 at 07:49:43PM +0200, Lars Hallberg wrote:
 [ ... ]
 Not much faster I'm afraid, but a new version available at the same place:
   http://www.micropp.se/openmoko/res/key2key.py
 
 Lars, can you please explain what you mean how this new 12-chars-per-key
 system works?
 
 Pretty simple, You have 12 key (3x4 array) and ether tap a key or press 
 it and drag to any of the other 11 keys - 12 functions. It's extendible 
 - If You add a column of keys You got 15 keys with 15 functions. 
 Actually plan on letting the user (and possibly apps) customize the 
 keyboard in part - that may include adding extra columns :-)

Ah, OK.  But don't this have the drawback that it is not possible to
show the positions second-level characters in advance?  So you have
to guess which key to press to find out whether the character you
look for is on the second level of the key you pressed.


___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-05 Thread Henryk Plötz
Moin,

Am Mon, 3 Sep 2007 08:52:45 +0200 schrieb pHilipp Zabel:

 The python-pygtk package should now depend on -pygobject and -pycairo
 and I moved the .pc file out of python-pygobject, so it shouldn't
 depend on libglib-2.0-dev anymore. Could you rebuild and test those
 three packages, please?

Ah, that's better, thanks.

-- 
Henryk Plötz
Grüße aus Berlin
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-05 Thread Henryk Plötz
Moin,

Am Wed, 05 Sep 2007 03:53:17 +0200 schrieb Lars Hallberg:

 Over to Your problem. Your Python is probably to old. According to
 the python docs (3.6.1 String Methods) You need python 2.5:

I had the same problem and whipped up a quick partition(). Works ok for
me (patch attached).

-- 
Henryk Plötz
Grüße aus Berlin
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~
--- key2key.py.old	2007-09-02 20:10:56.0 +0200
+++ key2key.py	2007-09-05 10:38:39.0 +0200
@@ -12,6 +12,12 @@
 scale = scale * 4.0 / cols
 hscale = hscale * scale
 
+def partition(s, sep):
+if sep in s:
+a,b = s.split(sep,1)
+return (a,sep,b)
+else: return (s, ,)
+
 keymap = [ [  # What function each 'key' vill have
 [ [1:@#$\, ', \, `, x, x ],
   [@, $, %, ~, x, x ],
@@ -97,7 +103,7 @@
 
 def build_label(self, l):
 p = pango.AttrList()
-(ll, sep, s) = l.partition(:)
+(ll, sep, s) = partition(l,:)
 if sep == ::
 l = \n.join([ll, s])
 p.insert(pango.AttrScale(hscale, 0, len(ll)))
@@ -168,7 +174,7 @@
 
 	c = keymap[row][col][ii][jj]
 if (ii == row) and (jj == col):
-(c, text, t) = c.partition(:)
+(c, text, t) = partition(c,:)
 text = c
 if c == enter:
 	self.txt.insert_at_cursor(\n)
___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-05 Thread Lars Hallberg

Josef Wolf skrev:

On Wed, Sep 05, 2007 at 03:53:17AM +0200, Lars Hallberg wrote:
Pretty simple, You have 12 key (3x4 array) and ether tap a key or press 
it and drag to any of the other 11 keys - 12 functions. It's extendible 
- If You add a column of keys You got 15 keys with 15 functions. 
Actually plan on letting the user (and possibly apps) customize the 
keyboard in part - that may include adding extra columns :-)


Ah, OK.  But don't this have the drawback that it is not possible to
show the positions second-level characters in advance?  So you have
to guess which key to press to find out whether the character you
look for is on the second level of the key you pressed.


Yes, kind of.

You can show the most common (letters, numbers).

You can try to group them logically and show a mnemonic hint at what 
characters are there (ie ,. - punctuation)


You can cancel a key press by dragging outside the keyboard to assist in 
searching.


But in the end is all about learning. To be really fast You need to 
learn the secondary key position so You can start the 'stroke' at once. 
In practice it don't appear to be as much of a problem as it sounds :-) 
You learn what You use often fast and the rest is rare enough to not be 
too troubling.


The key layout is not yet in any way optimal, and only in 'numlock' version.

To ease learning I believe the difference between numlock and not should 
be minimal... Like swap the number and the most used letter on each 
key... Stuff away 1 and 2 on 1, and pulling up the two most used letters 
left to those positions.



___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-04 Thread Josef Wolf
On Sun, Sep 02, 2007 at 07:49:43PM +0200, Lars Hallberg wrote:
[ ... ]
 Not much faster I'm afraid, but a new version available at the same place:
   http://www.micropp.se/openmoko/res/key2key.py

Lars, can you please explain what you mean how this new 12-chars-per-key
system works?

I have tried to run this on my suse-box (no more neo's available :-():

  [EMAIL PROTECTED]:~ ./key2key.py
  Traceback (most recent call last):
File ./key2key.py, line 271, in ?
  tmfexample = Key2KeyKeyboardTest()
File ./key2key.py, line 243, in __init__
  l = self.build_label(k[i][j])
File ./key2key.py, line 100, in build_label
  (ll, sep, s) = l.partition(:)
  AttributeError: 'str' object has no attribute 'partition'
  [EMAIL PROTECTED]:~ 

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-04 Thread Tilman Baumann

Josef Wolf wrote:

On Sun, Sep 02, 2007 at 07:49:43PM +0200, Lars Hallberg wrote:
[ ... ]

Not much faster I'm afraid, but a new version available at the same place:
  http://www.micropp.se/openmoko/res/key2key.py


Lars, can you please explain what you mean how this new 12-chars-per-key
system works?

I have tried to run this on my suse-box (no more neo's available :-():


Use Pythin 2.5. The partition method is introduced in version 2.5


python2.5 key2key.py
on my debian box.

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-04 Thread Lars Hallberg

Josef Wolf skrev:

On Sun, Sep 02, 2007 at 07:49:43PM +0200, Lars Hallberg wrote:
[ ... ]

Not much faster I'm afraid, but a new version available at the same place:
  http://www.micropp.se/openmoko/res/key2key.py


Lars, can you please explain what you mean how this new 12-chars-per-key
system works?


Pretty simple, You have 12 key (3x4 array) and ether tap a key or press 
it and drag to any of the other 11 keys - 12 functions. It's extendible 
- If You add a column of keys You got 15 keys with 15 functions. 
Actually plan on letting the user (and possibly apps) customize the 
keyboard in part - that may include adding extra columns :-)


Over to Your problem. Your Python is probably to old. According to the 
python docs (3.6.1 String Methods) You need python 2.5:


partition(sep)
Split the string at the first occurrence of sep, and return a 3-tuple 
containing the part before the separator, the separator itself, and the 
part after the separator. If the separator is not found, return a 
3-tuple containing the string itself, followed by two empty strings. New 
in version 2.5.


It's probably more stuff that needs fresh versions. Sorry.

/LaH



I have tried to run this on my suse-box (no more neo's available :-():

  [EMAIL PROTECTED]:~ ./key2key.py
  Traceback (most recent call last):
File ./key2key.py, line 271, in ?
  tmfexample = Key2KeyKeyboardTest()
File ./key2key.py, line 243, in __init__
  l = self.build_label(k[i][j])
File ./key2key.py, line 100, in build_label
  (ll, sep, s) = l.partition(:)
  AttributeError: 'str' object has no attribute 'partition'
  [EMAIL PROTECTED]:~ 



___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-03 Thread pHilipp Zabel
On 9/3/07, Henryk Plötz [EMAIL PROTECTED] wrote:
 Moin,

 Am Thu, 30 Aug 2007 20:12:00 +0200 schrieb Lars Hallberg:

  Both demos can easily be adjusted between 3x4 to 3x6 keys to test the
  feel. I don't know hove easy it is to get a PyGTK demo running on the
  phone... and they probably perform horribly. But I would be grateful
  for any report on hove easy the keys and strokes are to hit.

 Hmm, I just ran it on a Neo and seems to work okay. The biggest problem
 is that switching to the second set of displayed keys is awfully slow.
 Apart from that it's only missing some optimizations of the layout.
 (For example: Backspace absolutely needs to be a main key. Nobody needs
 ^ as a main key.)

 In order to run it on a Neo you need to install python-pygtk,
 python-pygobject (might need ipkg install -force-overwrite since it
 pulls in libc6-dev, but that's another story) and python-pycairo.

The python-pygtk package should now depend on -pygobject and -pycairo
and I moved the .pc file out of python-pygobject, so it shouldn't depend
on libglib-2.0-dev anymore. Could you rebuild and test those three packages,
please?

cheers
Philipp

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-03 Thread Lars Hallberg

Henryk Plötz skrev:

Moin,

Hmm, I just ran it on a Neo and seems to work okay. The biggest problem
is that switching to the second set of displayed keys is awfully slow.


Yes... I believe it's the text rendering. dreamingWish gtk.Label had a 
flag 'cash_rendering' and maybe a method 'pre_render' taking a win as 
argument so it usable even if the label is not attached to a top level 
window yet/dreaming


Been looking at doing it myself. But I'm a bit of a newbie on the hole 
thing (gtk, pango, gdk). Have not really figured out how to render 
according to the gtk style at use. And I'm not sure have important speed 
is for a demo.



Apart from that it's only missing some optimizations of the layout.
(For example: Backspace absolutely needs to be a main key.


Backspace is important... but a main key when it is only 12 main keys? 
Figured space and drag back was intuitive.



Nobody needs ^ as a main key.)


That key, and its 'page' is meant to be user definable, and possibly app 
dependent... so ju can put backspace there :-)


Thanks /LaH


___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-02 Thread Lars Hallberg

Kristian 'kriss' Mueller skrev:

Lars Hallberg wrote:


This is a new one (Layout is 'numlock' one):
   http://www.micropp.se/openmoko/res/key2key.py


Nice idea. Had to change the code a bit, as the UI of the current
version fires up the keyboard if a text entry has the focus - see patch.


I intentionally gave the text entry focus so the cursor was visible. But 
it's not worth the keyboard popping up :-) That means You tested it on 
OpenMoko? On a neo even? Very curious :-p



For me it was hard to choose the right finger to tapping, so that a
second one could be used for actual selection. 


It's better to just move one finger and release it at the needed key.
Anyway I like the idea.


That's the intended use. 'Two' in the subject means it was two demo's :-)


I guess one could learn to write short texts quite fast with one hand
that way.


Yes... When one learn where the secondary keys are and can start the 
stoke immediately it should be pretty fast.


The other demo, with 8 drag directions should be slightly faster as the 
drag target is closer and bigger. But the neighbouring keys should be OK 
(close), the keys at the screen edges (especialy the corners) should be 
ok (big). Some keys in the middle and top may be worse.


A god layout should take this in account... The demo have only a quick 
and ugly layout thou.


This key2key system have advantages to. The other demo have problems 
around the edges of the screen (drag going off screen) and less function 
per key (9  vs 12).


I'm trying to speed it up so it be a while before Your fix comes out.

Thanks /LaH


___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-02 Thread denis
Lars Hallberg schrieb:
 This is a new one (Layout is 'numlock' one):

   http://www.micropp.se/openmoko/res/key2key.py

 12 keys... tap a key for main function. Drag to any of the other keys
 for 11 secondary functions. A total of 12*12=144 combinations.

 To much to show... You have to press a key to see the secondary keys.
 Drag outside the keyboard to cancel a keypress.

 A bit awkward to begin with... might work fast when You learn to know
 the most common secondary keys.

 Know of no patent jet.

 Old demo:

http://www.micropp.se/openmoko/res/keys.py

 Tap key or drag in any of 8 directions. 9 funktions per key, easier
 strokes (bigger end target, butt less functions per key may need to be
 compensated with smaller start target). maybe patent encumbered.

 Both demos can easily be adjusted between 3x4 to 3x6 keys to test the
 feel. I don't know hove easy it is to get a PyGTK demo running on the
 phone... and they probably perform horribly. But I would be grateful
 for any report on hove easy the keys and strokes are to hit.

 /LaH


 ___
 OpenMoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community


I've tested the input system and it works very well even for a beginner
like me. It is very intuitive and after a short time of practice I'm
very fast writting with it. It would be interesting to test this system
combined with word prediction.

Regards, Denis.

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-02 Thread Andy Poling

Lars Hallberg wrote:

This is a new one (Layout is 'numlock' one):

  http://www.micropp.se/openmoko/res/key2key.py


denis wrote:

I've tested the input system and it works very well even for a beginner
like me. It is very intuitive and after a short time of practice I'm
very fast writting with it.


Though I was skeptical due to the apparent complexity in the description :-)
I also found it fairly easy to use even without practice.

Nice one, Lars.

-Andy

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Two finger input methods (PyGTK demos)

2007-09-02 Thread Henryk Plötz
Moin,

Am Thu, 30 Aug 2007 20:12:00 +0200 schrieb Lars Hallberg:

 Both demos can easily be adjusted between 3x4 to 3x6 keys to test the 
 feel. I don't know hove easy it is to get a PyGTK demo running on the 
 phone... and they probably perform horribly. But I would be grateful
 for any report on hove easy the keys and strokes are to hit.

Hmm, I just ran it on a Neo and seems to work okay. The biggest problem
is that switching to the second set of displayed keys is awfully slow.
Apart from that it's only missing some optimizations of the layout.
(For example: Backspace absolutely needs to be a main key. Nobody needs
^ as a main key.)

In order to run it on a Neo you need to install python-pygtk,
python-pygobject (might need ipkg install -force-overwrite since it
pulls in libc6-dev, but that's another story) and python-pycairo.


-- 
Henryk Plötz
Grüße aus Berlin
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~

___
OpenMoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community