Hi,

On Fri, May 13, 2011 at 8:40 PM, Laszlo KREKACS
<laszlo.krekacs.l...@gmail.com> wrote:
> Im still fighting with shortcuts. With Ctrl-S I change file export
> behaviour, and it
> inputs into the focused elementary.Entry a hexa 13 char.
>
> But what I really miss is the TAB key. Thats a real blocker. Jumping
> to the next elementary.Entry is useless.

Seems like every Control-[key] combination inputs some non-printable
character in the elementary.Entry field.
Looking to the saved textfile with vim, I see ^S (for control-s), ^E
(for control-e), etc, etc.

Those are the hexa values:
Ctrl-q \x11
Ctrl-w \x17
Ctrl-e \x05
Ctrl-r \x12
Ctrl-t \x14

Also EventKeyDown does report with those values:

Control-s:
Entry(name=%r, geometry=(163, 244, 96, 40),
      color=(255, 255, 255, 255),
      layer=0, clip=True, visible=True)
EventKeyDown(keyname='s', key='s', string='\x13', compose='\x13',
timestamp=376079218, event_flags=0x1) Layout(name=%r, geometry=(0, 0,
800, 480), color=(255, 255, 255, 255), layer=0, clip=False,
visible=True)

Normal 's' keypress:
Entry(name=%r, geometry=(163, 244, 112, 40),
      color=(255, 255, 255, 255),
      layer=0, clip=True, visible=True)
EventKeyDown(keyname='s', key='s', string='s', compose='s',
timestamp=376100124, event_flags=0x1) Layout(name=%r, geometry=(0, 0,
800, 480), color=(255, 255, 255, 255), layer=0, clip=False,
visible=True)

It is basically the same problem, as with tab key, I should just stop
processing the event somehow.
(so it does not put the \x13 char into the Entry).

Maybe Im just too shortsighted, and there are some valid usecase
inputing nonprintable ascii chars into the elementary.Entry field
(maybe a hex editor?).

Im already using 3 workarounds:
1. I keep the Entry's cursor position in a local variable (to know
where am I exactly, and when to jump to an another Entry).

2. With Tab key, I keep a local variable which Entry is in the focus.
When tab is pressed, I process it, then I restore the focus where it
should be.

3. Now as I figured out where comes the occasional nonprintable chars
in my saved file, Im implementing a workaround as I save which
nonprintable char was inputted (\x13), then after the event finished I
manually replace the content with entry_set().
The problem is
- I dont know when the event finishes exactly(so I can put the
correction function into ecore_idler hoping the event already went
down)
- If the nonprintable char injected into the middle of the Entry, I
could erase this char and position the cursor there. The problem is,
there are no such method call, only end_set() where I position the
cursor at the end of the entry. So it would result cursor jumping to
the end of entry.

Maybe the best method is when I save the entry, I replace all those
nonprintable chars at once. (So I save in the mean time what was
inputted, and I bulk-erase).

I tried to search for some keyboard using elementary apps on google
codesearch, but not much luck.

Bests,
 Laszlo

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to