Skip to content

Commit

Permalink
#118 some work, still not ready
Browse files Browse the repository at this point in the history
  • Loading branch information
double-fault committed Jan 19, 2017
1 parent ced743f commit f8f9204
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/sh/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ volatile uint32_t cmd_active_index = 0;

volatile uint32_t shell_instance_cnt = 0;

volatile struct typed_cmd cmd_active;
volatile struct typed_cmd cmd_active;
int virtual_cursor_pos = 0;
rtc_t start_time;

struct cmd_t *cmds[] =
Expand Down
2 changes: 2 additions & 0 deletions bin/boneshell/boneshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ void loop_terminal()
video_drivers[VGA_VIDEO_DRIVER_INDEX]->fg = FG__;
video_drivers[VGA_VIDEO_DRIVER_INDEX]->bg = BG__;

virtual_cursor_pos = 0;

scank(true,true, "%s" , cmd_active.value);

if(tab_multiple_opts==true)
Expand Down
1 change: 1 addition & 0 deletions include/apps/sh/shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ extern volatile bool tab_multiple_opts;
extern volatile bool tab_one_opt;
extern volatile bool tab_zero_opt;
volatile uint32_t shell_instance_cnt;
extern int virtual_cursor_pos;
extern rtc_t start_time;

#endif /*_APPS_TERM_TERMINAL_H_*/
Expand Down
10 changes: 10 additions & 0 deletions platform/pc/drv/ps2/kbd/kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,16 @@ void key_handler()
break;
case KBD_CAPS_PRESS_ID:
kbd_info.is_caps = !kbd_info.is_caps;
break;
case KBD_LEFT_KEY_ID:
if (LENGTH_INPUT > 0)
{
virtual_cursor_pos ++;
video_drivers[VGA_VIDEO_DRIVER_INDEX]->update_cursor
(video_drivers[VGA_VIDEO_DRIVER_INDEX]->video_row,video_drivers[VGA_VIDEO_DRIVER_INDEX]->video_column - virtual_cursor_pos
,__crsr_start,__crsr_end);
index_scank --;
}
break;
case KBD_UP_KEY_ID:
if(TERMINAL_MODE == true && UP_KEY_ACTIVE == true)
Expand Down

0 comments on commit f8f9204

Please sign in to comment.