Skip to content

Commit

Permalink
All bugfixes done, left and right arrow keys ready #118
Browse files Browse the repository at this point in the history
  • Loading branch information
double-fault committed Jan 21, 2017
1 parent 0e31684 commit 73f6401
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions platform/pc/drv/ps2/kbd/kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,10 @@ void key_handler_util(int key)

void key_handler_util_backspace()
{
if(!((LENGTH_INPUT-1) < 0))
if(!((LENGTH_INPUT-1) < 0) && virtual_index_scank > 0)
{
if(active_scank == true)
{
/*buffer_scank[virtual_index_scank--] = 0;
index_scank --;
//virtual_index_scank --;*/
{
if (index_scank > (unsigned)virtual_index_scank)
{
for (int i = virtual_index_scank; i < (int)index_scank; i ++)
Expand All @@ -332,8 +329,11 @@ void key_handler_util_backspace()

if(print_scank == true)
{
//printk ("\n%d\n", virtual_index_scank);
if ((unsigned)virtual_index_scank + 1 < index_scank)
if (virtual_index_scank < 0)
{
return;
}
else if ((unsigned)virtual_index_scank + 1 < index_scank)
{
int temp = LENGTH_INPUT;
while (temp > 0) {printk ("\b"); temp --;}
Expand Down

0 comments on commit 73f6401

Please sign in to comment.