Commit 28e733eb by malcolm

Added CTRL support, and ^L to clear for testing

parent 5c4b5e97
Showing with 18 additions and 0 deletions
...@@ -123,6 +123,14 @@ void kbd_irq() ...@@ -123,6 +123,14 @@ void kbd_irq()
{ {
modifiers[MOD_SHIFT]=0; modifiers[MOD_SHIFT]=0;
} }
else if(a==0x1d)
{
modifiers[MOD_CTRL]=1;
}
else if(a==0x9d)
{
modifiers[MOD_CTRL]=0;
}
else else
{ {
if(a==0x4b) if(a==0x4b)
...@@ -167,6 +175,16 @@ void kbd_irq() ...@@ -167,6 +175,16 @@ void kbd_irq()
terminal_putchar(in); terminal_putchar(in);
} }
} }
else if(modifiers[MOD_CTRL]==1&&(in=='l'||in=='L'))
{
terminal_clear();
for(int i=0;i<kb_buf_size;i++)
{
kb_buf[i]='\0';
}
kb_buf_size=0;
terminal_writestring("> ");
}
else if(in!='\0') else if(in!='\0')
{ {
kb_buf[kb_buf_size]=in; kb_buf[kb_buf_size]=in;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment