Subversion Repositories HelenOS-historic

Rev

Rev 1569 | Rev 1649 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1569 Rev 1645
Line 75... Line 75...
75
 
75
 
76
int kbd_arch_process(keybuffer_t *keybuffer, int scan_code)
76
int kbd_arch_process(keybuffer_t *keybuffer, int scan_code)
77
{
77
{
78
    static unsigned long long buf=0;
78
    static unsigned long long buf=0;
79
    static int count=0;
79
    static int count=0;
-
 
80
    static int esc_count=0;
80
 
81
 
81
 
82
 
82
    /*
83
    /*
83
    * Please preserve this code (it can be used to determine scancodes)
84
    * Please preserve this code (it can be used to determine scancodes)
84
    *
-
 
85
    keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf));
-
 
86
    keybuffer_push(keybuffer, to_hex(scan_code&0xf));
-
 
87
    keybuffer_push(keybuffer, ' ');
-
 
88
    keybuffer_push(keybuffer, ' ');
-
 
89
    */
85
    */
-
 
86
    //keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf));
-
 
87
    //keybuffer_push(keybuffer, to_hex(scan_code&0xf));
-
 
88
    //keybuffer_push(keybuffer, ' ');
-
 
89
    //keybuffer_push(keybuffer, ' ');
-
 
90
    //*/
90
   
91
   
91
   
92
   
92
    if (scan_code){
93
    if (scan_code){
93
        buf|=(unsigned long long) scan_code<<(8*(count++));
94
        buf|=(unsigned long long) scan_code<<(8*(count++));
94
    }   else {
95
    } else {
-
 
96
       
-
 
97
 
-
 
98
        if ( buf == 0x1b ) {
-
 
99
            esc_count++;
-
 
100
            if ( esc_count == 3 ) {
-
 
101
            __SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE);
-
 
102
            }  
-
 
103
        } else {
-
 
104
            esc_count=0;
95
           
105
        }
-
 
106
   
96
        if ( ! ( buf & 0xff00 ))
107
        if ( ! ( buf & 0xff00 ))
97
            keybuffer_push(keybuffer, buf);
108
            keybuffer_push(keybuffer, buf);
98
        else {
109
        else {
99
            switch (buf){
110
            switch (buf){
100
                case KEY_F1:
111
                case KEY_F1: