ctrl+f & ctrl+_b now supported

SVN revision: 4334
This commit is contained in:
Carsten Haitzler 2001-03-06 19:26:55 +00:00
parent dad3312cb8
commit 35cd461c8c
2 changed files with 13 additions and 0 deletions

View File

@ -551,6 +551,7 @@ struct _E_Entry
int mouse_down;
int visible;
int focused;
int scroll_pos;
int x, y, w, h;
Evas_Object event_box;
Evas_Object clip_box;

View File

@ -383,6 +383,7 @@ e_entry_handle_keypress(E_Entry *entry, Ev_Key_Down *e)
type = e_key_press_translate_into_typeable(e);
if (type)
{
printf("%0x\n", type[0]);
if ((strlen(type) == 1) && (type[0] == 0x01)) /* ctrl+a */
{
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);
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)
{
e_entry_clear_selection(entry);