Skip to content

Commit 58cefa7

Browse files
committed
Add keyboard click
1 parent d8b82e9 commit 58cefa7

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

src/keyboard.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ extern padBool TTY;
2525
static unsigned char ch;
2626
unsigned char is_extend=0; //deleted static is used in IO.C now for Rasta bars
2727

28+
/**
29+
* A simple key press feedback.
30+
*/
31+
void keyboard_click(void)
32+
{
33+
unsigned char i,j;
34+
for (i=0;i<=10;i++)
35+
{
36+
bit_click();
37+
for (j=0;j<4;j++)
38+
{
39+
}
40+
}
41+
}
42+
2843
/**
2944
* keyboard_out - If platoKey < 0x7f, pass off to protocol
3045
* directly. Otherwise, platoKey is an access key, and the
@@ -62,8 +77,9 @@ void keyboard_main(void)
6277
ch=getk();
6378
if (ch!=0x00)
6479
{
65-
bit_fx4(0); //Keyboard click - until I find some thing better
66-
80+
/* bit_fx4(0); //Keyboard click - until I find some thing better */
81+
keyboard_click(); // maybe something better? ;) -thom
82+
6783
if (is_extend==0 && ch==0x0e) // EXTEND pressed.
6884
{
6985
#ifdef __SPECTRUM__

src/keyboard.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
#ifndef KEYBOARD_H
1111
#define KEYBOARD_H
1212

13+
/**
14+
* A simple key press feedback.
15+
*/
16+
void keyboard_click(void);
17+
1318
/**
1419
* keyboard_out - If platoKey < 0x7f, pass off to protocol
1520
* directly. Otherwise, platoKey is an access key, and the

0 commit comments

Comments
 (0)