bind -l lists what bind is currently set up to do.
I don't see how it can do anything except what is related to "playing with" the readline library. AFAIK the "function" you refer to has to be part of readline. Which can be customized as well.
Please tell us:
What are PRECISELY you trying to do - not how you already tried to do it?
This what I mean by a macro - expanding a keypress into a fixed command
edit: look at your /etc/inputrc file ( assuming linux) to see pre-defined key bindings. Looking at your other post I think you are trying to use ^[ instead of \e for example.
This works ONLY when ls is a shell builtin, I believe.
Last edited by jim mcnamara; 09-23-2011 at 01:15 PM..
Hi All,
How can I trap a character press in the shell script.
For eg:- I have a script runinng a infinite loops , I will need to dispay menu asking for run process of to stop process and process stauts like we do in glance
I have seen the traping the signal in glance command, (8 Replies)
Yo,
I program Unix for fun- except when editing my website removed by reborg - and wanted to learn how to track, trap, and use to my advantage a user keypress. I know there is a built-in JS function that can do that, but Javascript is a client-side language, therefore not usable in Unix, and... (2 Replies)
I am trying to run this code from script.
mysqladmin -u root --password='******' --socket=/tmp/mysql.sock drop ROAD_HAULAGE_TEMP
Though it does what i want it asks for me to click 'y' then enter. This is not appropriate because i want it to run from cron. Can i get mysqladmin to drop a... (1 Reply)
Hi,
New user here, I have googled this but found nothing that helps me.
I have a file of data and want to display it to a user from within a "frame/window/screen" that allows the user to pageup/pagedown through the data.
I can do this mostly, but I cannot detect the pressing of the... (6 Replies)
Hi
i need to get the key pressed from the keyboard without focus on the application.
i work under CentOS 5.5 with QtC++ 4.7 and Python Script (0 Replies)
Hi,
I want to know what exactly bind paameter does?
what exactly bind_param( 1, $siteName ) means?
what 1 means?
In some examples the bind_param is set like this:
bind_param( 2, $siteName1 )
bind_param( 3, $siteName2 )
$sth = $dbh->prepare( "
SELECT name,... (1 Reply)
Hey guys,
I'm looking for a solution to simulate a key-combo (tab+q) inside an amiga-emulator. I've tried it with uinput and python without any success.
Any help would be great.
Cheers
McCarthy (5 Replies)
I have a bash loop that waits for a single key press, then does $something depending on what $key is pressed before refreshing the screen with updated data. The problem I have is that the script will store additional key presses and chain them together causing the screen to redraw and the script... (1 Reply)
Hello everybody,
I am using Windows 10 and cygwin/bash.
I need to write a script in bash which simulates opening of a program and then press some keys such as F5, ENTER and ALT+F4.
I have written a VBScript which does the job
Set WshShell = WScript.CreateObject("WScript.Shell")... (9 Replies)
Discussion started by: supernono06
9 Replies
LEARN ABOUT CENTOS
keyboard_ucallback
keyboard_ucallback(3alleg4) Allegro manual keyboard_ucallback(3alleg4)NAME
keyboard_ucallback - User specified unicode keyboard callback handler. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
extern int (*keyboard_ucallback)(int key, int *scancode);
DESCRIPTION
Unicode-aware version of keyboard_callback(). If set, this function is called by the keyboard handler in response to every keypress. It is
passed the character value and scancode that are about to be added into the input buffer, can modify the scancode value, and returns a new
or modified key code. If it both sets the scancode to zero and returns zero, the keypress will be ignored. This routine executes in an
interrupt context, so it must be in locked memory. Example:
int silence_g_key(int key, int *scancode)
{
if (key == 'g') {
*scancode = 0;
return 0;
}
return key;
} END_OF_FUNCTION(silence_g_key)
...
install_timer();
LOCK_FUNCTION(silence_g_key);
install_keyboard();
keyboard_ucallback = silence_g_key;
Note that this keyboard callback has priority over the non unicode callback. If you set both, only the unicode one will work.
SEE ALSO install_keyboard(3alleg4), readkey(3alleg4), ureadkey(3alleg4), keyboard_callback(3alleg4), keyboard_lowlevel_callback(3alleg4)Allegro version 4.4.2 keyboard_ucallback(3alleg4)