Rev 1507 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1507 | Rev 1570 | ||
---|---|---|---|
Line 106... | Line 106... | ||
106 | 106 | ||
107 | /** Ask keyboard if a key was pressed. */ |
107 | /** Ask keyboard if a key was pressed. */ |
108 | void poll_keyboard(void) |
108 | void poll_keyboard(void) |
109 | { |
109 | { |
110 | char ch; |
110 | char ch; |
- | 111 | static char last; |
|
111 | 112 | ||
112 | if (kb_disable) |
113 | if (kb_disable) |
113 | return; |
114 | return; |
114 | 115 | ||
115 | ch = ski_getchar(); |
116 | ch = ski_getchar(); |
Line 120... | Line 121... | ||
120 | chardev_push_character(&ski_uconsole, ch); |
121 | chardev_push_character(&ski_uconsole, ch); |
121 | virtual_interrupt(IRQ_KBD,NULL); |
122 | virtual_interrupt(IRQ_KBD,NULL); |
122 | } |
123 | } |
123 | else { |
124 | else { |
124 | chardev_push_character(&ski_console, ch); |
125 | chardev_push_character(&ski_console, ch); |
- | 126 | } |
|
- | 127 | last = ch; |
|
- | 128 | return; |
|
- | 129 | } |
|
125 | 130 | ||
- | 131 | if (last){ |
|
- | 132 | if(kbd_uspace){ |
|
- | 133 | chardev_push_character(&ski_uconsole, 0); |
|
- | 134 | virtual_interrupt(IRQ_KBD,NULL); |
|
- | 135 | } |
|
- | 136 | else { |
|
126 | } |
137 | } |
127 | 138 | last = 0; |
|
128 | } |
139 | } |
- | 140 | ||
129 | } |
141 | } |
130 | 142 | ||
131 | /* Called from getc(). */ |
143 | /* Called from getc(). */ |
132 | static void ski_kb_enable(chardev_t *d) |
144 | static void ski_kb_enable(chardev_t *d) |
133 | { |
145 | { |