06-08-2015
You could compare if the current key pressed is equal to the last key pressed, respectivly if it already has been printed.
Dunno what that stty is about, and that usage of dd as streamreader is also still new to me, but nicely made!
You're not aiming for a typewriter style are you?
7 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
A Solaris AXI 440 machine with Solaris 8 version.
I have PC users who use an emulation to login to the Solaris
server.
How can I change the keyboard mapping of the Sun keyboard
to fit to the PC keyboard ?
Any comment will be appreciated.
Thanks (1 Reply)
Discussion started by: simhab
1 Replies
2. SCO
I have a cron job that creates my backup tape. However my commands in this job are timing out, therefore "Retrying job retry" is the loop it is hung into. I cannot telnet to the box nor get a login prompt. What is the kill command keystone stroke sequence that will break a cron job?
Thanks, (3 Replies)
Discussion started by: jwideman
3 Replies
3. Linux
Hi all,
I'm running a mdk 10.2 cooker on my computer.
After and update, i've lost the "alt gr" key.
How am i supposed to get it back?
I've already googled around a bit, testing solutions provided, but nothing can help..
any other suggestions?
Thanx all
Jason (3 Replies)
Discussion started by: penguin-friend
3 Replies
4. UNIX for Dummies Questions & Answers
First off, let me start by saying that I am a total rookie when it comes to Unix so I will do my best to explain the situation.
BACKGROUND:We are running AIX and using a third party Inventory Management software called Acclaim. My main interface terminal is just a "dummy" terminal hooked up to... (1 Reply)
Discussion started by: sstaszak11
1 Replies
5. Solaris
Hi to everyone I am new at Solaris world so I need little help.
I can not put my keyboard to Croatian layout.
I tried to edit /etc/default/init and in that file I changed LC_ALL=hr_HR. Also I tried to change my language settings over GUI (input methods and SCIIM) but with no results.
Also tried... (11 Replies)
Discussion started by: microbot
11 Replies
6. What is on Your Mind?
Which Input device do you use the most ?
for me... keyboard ofcourse !! (56 Replies)
Discussion started by: vpraveen84
56 Replies
7. UNIX for Dummies Questions & Answers
Hi, I've got a bit of a ridiculous problem and wasn't sure where to post it.
I need to use the vertical bar for piping in Bash but, as per the title, am using a UK layout on a US (physical) keyboard which doesn't have a key for it in the place I'd expect. I've tried using xbindkeys and Unicode... (7 Replies)
Discussion started by: crunchgargoyle
7 Replies
LEARN ABOUT V7
keyboard_lowlevel_callback
keyboard_lowlevel_callback(3alleg4) Allegro manual keyboard_lowlevel_callback(3alleg4)
NAME
keyboard_lowlevel_callback - User specified low level keyboard event handler. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
extern void (*keyboard_lowlevel_callback)(int scancode);
DESCRIPTION
If set, this function is called by the keyboard handler in response to every keyboard event, both presses (including keyboard repeat rate)
and releases. It will be passed a raw keyboard scancode byte (scancodes are 7 bits long), with the top bit (8th bit) clear if the key has
been pressed or set if it was released. This routine executes in an interrupt context, so it must be in locked memory. Example:
volatile int key_down, key_up;
void keypress_watcher(int scancode)
{
if (scancode & 0x80) {
key_up = 1;
} else {
key_down = 1;
}
} END_OF_FUNCTION(keypress_watcher)
...
install_timer();
LOCK_FUNCTION(silence_g_key);
LOCK_VARIABLE(key_down);
LOCK_VARIABLE(key_up);
install_keyboard();
keyboard_lowlevel_callback = keypress_watcher;
/* Disable keyboard repeat to get typewriter effect. */
set_keyboard_rate(0, 0);
...
while (game_loop) {
if (key_down) {
key_down = 0;
/* Play sample of typewriter key press. */
}
if (key_up) {
key_up = 0;
/* Play sample of typewriter key release. */
}
}
SEE ALSO
install_keyboard(3alleg4), keyboard_callback(3alleg4), keyboard_ucallback(3alleg4), exkeys(3alleg4)
Allegro version 4.4.2 keyboard_lowlevel_callback(3alleg4)