Sponsored Content
Top Forums Shell Programming and Scripting Perl - Reading keyboard keystroke Post 302363050 by durden_tyler on Monday 19th of October 2009 09:34:09 AM
Old 10-19-2009
Quote:
Originally Posted by Alalush
...
If yes , how can I implement the part which reading the keyboard keystroke?
Is there any moudle that handle it ?
...
Seems like there are a couple (check cpan search):

Term::ReadKey
Term::InKey

tyler_durden
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How can I map Unix keyboard for PC keyboard

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. Shell Programming and Scripting

Reading from Keyboard - Shell Script

How do i read from kb using shell script but i need to read it from same line. Script :- echo "Please Enter Your Choice " read CHOICE But it goes to next line i need it to read it next to Choice and not new line. (4 Replies)
Discussion started by: dinjo_jo
4 Replies

3. Shell Programming and Scripting

Regarding automatic keystroke

Hi All , I am writing a shell script for a 3D test case . The 3D Test case involves the user to press some keys to see the changes in the 3d test case . The user has to press p , r , a , z etc to observe the changes on screen . Now please let me know how can i implement the keystroke p , a ,... (1 Reply)
Discussion started by: dskonnur
1 Replies

4. UNIX for Dummies Questions & Answers

Capturing the keystroke

i have the below script: #!/bin/bash echo "enter a" read a echo "enter b" read b let c=a+b echo $c at any point of time between entering the value for a and b,if user presses ctrl+a key combination, then it should start from the beginning(the script should be restarted). it should... (4 Replies)
Discussion started by: pandeesh
4 Replies

5. UNIX for Dummies Questions & Answers

Reading from keyboard and sorting

Hi, I ahve come across one of the trickier scenario and wanted to check anyone came across this: i have a file called file1: pandi.desktop% cat file1 aa cc ds wwe bb pandi.desktop% I want to read input from keyboard and append into the original file. besides that i want to sort the... (1 Reply)
Discussion started by: pandeesh
1 Replies

6. UNIX for Dummies Questions & Answers

Problem getting vertical bar with British keyboard layout on US (physical) keyboard

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

7. Shell Programming and Scripting

Perl :: reading values from Data Dumper reference in Perl

Hi all, I have written a perl code and stored the data into Data structure using Data::Dumper module. But not sure how to retreive the data from the Data::Dumper. Eg. Based on the key value( Here CRYPTO-6-IKMP_MODE_FAILURE I should be able to access the internal hash elements(keys) ... (1 Reply)
Discussion started by: scriptscript
1 Replies
Term::Filter::Callback(3pm)				User Contributed Perl Documentation			       Term::Filter::Callback(3pm)

NAME
Term::Filter::Callback - Simple callback-based wrapper for Term::Filter VERSION
version 0.03 SYNOPSIS
use Term::Filter::Callback; my $term = Term::Filter::Callback->new( callbacks => { munge_input => sub { my $self = shift; my ($got) = @_; $got =~ s/ce/E- Elbereth /g; $got; }, munge_output => sub { my $self = shift; my ($got) = @_; $got =~ s/(Elbereth)/e[35m$1e[m/g; $got; }, }, ); $term->run('nethack'); DESCRIPTION
This module provides a callback-based API to Term::Filter. The desired callbacks can just be passed into the constructor of this class, rather than requiring a new class to be manually defined. This class consumes the Term::Filter role, so the rest of the documentation in that module applies here. ATTRIBUTES
callbacks A hashref of callbacks for Term::Filter. The keys are callback names and the values are coderefs to call for those callbacks. AUTHOR
Jesse Luehrs <doy at tozt dot net> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Jesse Luehrs. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-03-08 Term::Filter::Callback(3pm)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy