Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how2 get single char from keyboard w/o enter Post 302273287 by jwzumwalt on Saturday 3rd of January 2009 06:55:00 PM
Old 01-03-2009
Thanks, I found it! I had tried all kinds of internet searches for "bash input", bash press any key", etc and all I found was the standard "read" key routines. I had to do this about 3 years ago and had thought I used something like $keyin=<STDIN> but nothing like that has worked Smilie
JZ
 

9 More Discussions You Might Find Interesting

1. Programming

Adding a single char to a char pointer.

Hello, I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it: char* getext(char *file) { char *extension; int i, j;... (5 Replies)
Discussion started by: pallak7
5 Replies

2. Shell Programming and Scripting

how2 shell cmd into variable

How do I place the result of a shell command into a variable. I would like to save the pwd in $DIR. I tried... pwd | $DIR $DIR < pwd DIR=pwd thanks! jz (2 Replies)
Discussion started by: jwzumwalt
2 Replies

3. UNIX for Dummies Questions & Answers

tab char appearing as single space?

I'm trying to run a script which will ssh to several other servers (All Solaris 10) and execute a sar -f command to get each server's CPU usage for a given hour. It kinda works OK but I just can't figure out how to separate the returned fields with a Tab character. I've done lots of searching... (2 Replies)
Discussion started by: jake657
2 Replies

4. Shell Programming and Scripting

Help substituting text in a file having a single line but no newline char

Hello, Need help substituting a particular word in a file having a single line but no newline character at the end. I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line. $ cat hlq_detail /outputs/alvan23/PDFs/bills $ cat... (5 Replies)
Discussion started by: Shan_u2005
5 Replies

5. Shell Programming and Scripting

Formatting File having big single line into 95 Char Per Line

Hi All, I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end. Before:- File Name:- File1.dat 102 121340560... (10 Replies)
Discussion started by: lancesunny
10 Replies

6. Shell Programming and Scripting

Single char

Task 2: When Im tring script called char that checks a single character on the command line, c. If the character is a digit, digit is displayed. If the character is an upper or lowercase alphabetic character, letter is displayed. Otherwise, other is displayed. Have the script print an error... (0 Replies)
Discussion started by: Roozo
0 Replies

7. UNIX for Dummies Questions & Answers

Replacing multiple special chars with single char

Hi I've a string . And i need to replace set of characters with a single character Means .. or . or ... and so on should be replaced with single % character Irrespective of number of dots in between the characters , those should be replaced with single % All the above strings should be... (3 Replies)
Discussion started by: smile689
3 Replies

8. Shell Programming and Scripting

Transpose multiple rows (with a mix of space and enter) to a single column

How to change the uploaded weekly file data to the following format? New Well_Id,Old Well_Id,District,Thana,Date,Data,R.L,WellType,Lati.,Longi. BAG001,PT006,BARGUNA,AMTALI,1/2/1978,1.81,2.29,Piezometer,220825,901430 BAG001,PT006,BARGUNA,AMTALI,1/9/1978,1.87,2.29,Piezometer,220825,901430... (3 Replies)
Discussion started by: sara.nowreen
3 Replies

9. Shell Programming and Scripting

Loop logic, enter into respective IF as per enter input file name

have three big data file, however I just need to see the mentioned below one line form the all the file which has SERVER_CONNECTION Value File 1 export SERVER_CONNECTION=//dvlna002:10001/SmartServer File2 export SERVER_CONNECTION=///SmartServer File3 export... (1 Reply)
Discussion started by: Nsharma3006
1 Replies
keyboard_translatekeys(3)					Svgalib User Manual					 keyboard_translatekeys(3)

NAME
keyboard_translatekeys - modify scancode mappings in raw keyboard mode SYNOPSIS
#include <vgakeyboard.h> void keyboard_translatekeys(int mask); DESCRIPTION
This function sets several flags which control how certain scancodes are mapped. At startup a mask value of 0 is active. mask must be a logical or of zero or more of the following #predefined integers to turn the features listed on: TRANSLATE_CURSORKEYS Translate the scancodes of the SCANCODE_CURSORBLOCK* keys to those of the cursor keys on the number pad, s.t. keyboard_getstate(3) and keyboard_keypressed(3) report a keypress of the corresponding number pad cursor key and not the one on the cursor block. TRANSLATE_DIAGONAL Translates the scancodes of diagonal cursor keys (keypad 7, 9, 1, 3) to presses of two of the ordinary up, down, left, right keys. For example, instead of reporting a press of SCANCODE_CURSORUPRIGHT keyboard_getstate(3) and keyboard_keypressed(3) report a simul- taneous press of SCANCODE_CURSORUP and SCANCODE_CURSORRIGHT. TRANSLATE_KEYPADENTER The scancode of the keypad enter key is mapped to that of the ordinary enter key, s.t. keyboard_getstate(3) and keyboard_key- pressed(3) report a press of SCANCODE_ENTER regardless if keypad enter or ordinary enter is pressed. DONT_CATCH_CTRLC Pressing <Ctrl>-C does not raise a SIGINT. On contrary to the other flags this has also effect when a user defined keyboard event handler is used. Svgalib will always process <Alt>-F1 - <Alt>-F10 and perform console switches accordingly. BUGS
The TRANSLATE_* options above do really do simple scancode translations. For example, when TRANSLATE_KEYPADENTER is active and the user presses both enter and keypad enter. Then, if he releases one of them (say keypad enter), it's release event will clear the common keyboard state, s.t. no keypress is reported even though enter is still pressed. Similarly, if TRANSLATE_DIAGONAL is active, the user holds cursor upleft (keypad 7) down and then presses and release cursor up (keypad 8), svgalib will only report a pressed cursor left but the simulated cursor up will be lost. You can easily try this with the keytest(6) demo to make the effect more clear to you. SEE ALSO
svgalib(7), vgagl(7), libvga.config(5), keytest(6), eventtest(6), keyboard_seteventhandler(3), keyboard_init(3), key- board_init_return_fd(3), keyboard_close(3), keyboard_update(3), keyboard_waitforupdate(3), keyboard_setdefaulteventhandler(3), key- board_getstate(3), keyboard_clearstate(3), keyboard_keypressed(3), vga_waitevent(3) AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced function as well as of the original documentation is unknown. It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>. Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual. Svgalib (>;= 1.2.11) 29 July 1997 keyboard_translatekeys(3)
All times are GMT -4. The time now is 01:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy