forked from enlightenment/enlightenment
parent
dad3312cb8
commit
35cd461c8c
1
src/e.h
1
src/e.h
|
@ -551,6 +551,7 @@ struct _E_Entry
|
||||||
int mouse_down;
|
int mouse_down;
|
||||||
int visible;
|
int visible;
|
||||||
int focused;
|
int focused;
|
||||||
|
int scroll_pos;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
Evas_Object event_box;
|
Evas_Object event_box;
|
||||||
Evas_Object clip_box;
|
Evas_Object clip_box;
|
||||||
|
|
12
src/entry.c
12
src/entry.c
|
@ -383,6 +383,7 @@ e_entry_handle_keypress(E_Entry *entry, Ev_Key_Down *e)
|
||||||
type = e_key_press_translate_into_typeable(e);
|
type = e_key_press_translate_into_typeable(e);
|
||||||
if (type)
|
if (type)
|
||||||
{
|
{
|
||||||
|
printf("%0x\n", type[0]);
|
||||||
if ((strlen(type) == 1) && (type[0] == 0x01)) /* ctrl+a */
|
if ((strlen(type) == 1) && (type[0] == 0x01)) /* ctrl+a */
|
||||||
{
|
{
|
||||||
entry->cursor_pos = 0;
|
entry->cursor_pos = 0;
|
||||||
|
@ -400,6 +401,17 @@ e_entry_handle_keypress(E_Entry *entry, Ev_Key_Down *e)
|
||||||
e_entry_set_text(entry, str2);
|
e_entry_set_text(entry, str2);
|
||||||
free(str2);
|
free(str2);
|
||||||
}
|
}
|
||||||
|
else if ((strlen(type) == 1) && (type[0] == 0x06)) /* ctrl+f */
|
||||||
|
{
|
||||||
|
entry->cursor_pos++;
|
||||||
|
if (entry->cursor_pos > strlen(entry->buffer))
|
||||||
|
entry->cursor_pos = strlen(entry->buffer);
|
||||||
|
}
|
||||||
|
else if ((strlen(type) == 1) && (type[0] == 0x02)) /* ctrl+b */
|
||||||
|
{
|
||||||
|
entry->cursor_pos--;
|
||||||
|
if (entry->cursor_pos < 0) entry->cursor_pos = 0;
|
||||||
|
}
|
||||||
else if (strlen(type) > 0)
|
else if (strlen(type) > 0)
|
||||||
{
|
{
|
||||||
e_entry_clear_selection(entry);
|
e_entry_clear_selection(entry);
|
||||||
|
|
Loading…
Reference in New Issue