diff --git a/include/platform/pc/drv/ps2/kbd/kbd.h b/include/platform/pc/drv/ps2/kbd/kbd.h index e49048e..b5420f6 100644 --- a/include/platform/pc/drv/ps2/kbd/kbd.h +++ b/include/platform/pc/drv/ps2/kbd/kbd.h @@ -64,7 +64,9 @@ #define KBD_RIGHT_KEY_ID 0x101005 #define KBD_CAPS_PRESS_ID 0x101006 #define KBD_ENTER_PRESS_ID 0x101007 -#define KBD_CONTROL_PRESS_ID 0x101008 +#define KBD_CONTROL_PRESS_ID 0x101008 +#define KBD_HOME_KEY_ID 0x101009 +#define KBD_END_KEY_ID 0x101010 diff --git a/platform/pc/drv/ps2/kbd/kbd.c b/platform/pc/drv/ps2/kbd/kbd.c index 8ef8040..39750df 100644 --- a/platform/pc/drv/ps2/kbd/kbd.c +++ b/platform/pc/drv/ps2/kbd/kbd.c @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -258,6 +259,19 @@ void key_handler_util(int key) key_handler(); kbd_info.key = ' '; return; + } + else if (key == 'a' || key == 'A') + { + virtual_index_scank = 0; + virtual_cursor_pos = LENGTH_INPUT; + 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); + return; + } + else if (key == 'c' || key == 'C') + { + return; } } diff --git a/platform/pc/drv/ps2/kbd/kbd_layouts/scancodes_usa.c b/platform/pc/drv/ps2/kbd/kbd_layouts/scancodes_usa.c index 3b574c7..c47b3c2 100644 --- a/platform/pc/drv/ps2/kbd/kbd_layouts/scancodes_usa.c +++ b/platform/pc/drv/ps2/kbd/kbd_layouts/scancodes_usa.c @@ -46,7 +46,7 @@ int const QWERTY_USA_NOSHIFT_VAL[] = 0, /* < ... F10 */ 0, /* 69 - Num lock*/ 0, /* Scroll Lock */ - 0, /* Home key */ + KBD_HOME_KEY_ID, /* Home key */ KBD_UP_KEY_ID, /* Up Arrow */ 0, /* Page Up */ '-', @@ -54,7 +54,7 @@ int const QWERTY_USA_NOSHIFT_VAL[] = 0, KBD_RIGHT_KEY_ID, /* Right Arrow */ '+', - 0, /* 79 - End key*/ + KBD_END_KEY_ID, /* 79 - End key*/ KBD_DOWN_KEY_ID, /* Down Arrow */ 0, /* Page Down */ 0, /* Insert Key */