Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do i detect a keypress such as Page-Down ? Post 302421607 by gcraill on Saturday 15th of May 2010 05:57:53 AM
Old 05-15-2010
How do i detect a keypress such as Page-Down ?

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 pageup/pagedown keys.

I can get it to go with say "u[Enter]" for up using read input, but I want it to be one keypress of the pageup key.

Can anyone point me at some info on how to do this ?

Using HP-UX, with KSH-88.

Cheers
Greg

---------- Post updated at 12:57 PM ---------- Previous update was at 12:26 PM ----------

stty -a shows that -icanon is set, so I should be able to catch the key press ????
 

10 More Discussions You Might Find Interesting

1. Programming

keypress signals

How-to use keypress action signals in C? Is there any nice select or poll functions for that? (1 Reply)
Discussion started by: Esaia
1 Replies

2. Shell Programming and Scripting

keypress event in shell script

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)
Discussion started by: arvindng
8 Replies

3. Shell Programming and Scripting

How to trap a user keypress

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)
Discussion started by: signebedi
2 Replies

4. Shell Programming and Scripting

override mysqladmin drop table asking for keypress

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)
Discussion started by: timgolding
1 Replies

5. Shell Programming and Scripting

Bash KeyPress (or Read Single Character)

Hi, I'm sorry if this has already been posted somewhere but I can't seem to find it on the forums (or anywhere on google :( ) I am writing a script where a user must enter a single character to perform an action. For example, Press Q to Quit or R to Refresh Basically I am stuggling... (5 Replies)
Discussion started by: Ste_Moore01
5 Replies

6. Programming

get keypress c++Qt

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)
Discussion started by: HanyM.Magdy
0 Replies

7. Shell Programming and Scripting

Trying to Bind a keypress to a function

I've been trying to re-think an old problem that didn't get answered. I know this is possible, but I'm having trouble getting it to run. I just want to call a function with a key-press or key combination. I looked and saw bind can be used to run functions and other scripts this way. Here's what... (2 Replies)
Discussion started by: Azrael
2 Replies

8. Programming

Simulate keypress inside a non-x application...

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)
Discussion started by: mccarthy83
5 Replies

9. Shell Programming and Scripting

Bash loop hording keypress input

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)
Discussion started by: DarkPhoenix
1 Replies

10. UNIX for Beginners Questions & Answers

Simulate keypress in bash

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
emux_diag(1M)															     emux_diag(1M)

NAME
- the HP PCI/EISA multiplexer diagnostic program SYNOPSIS
DESCRIPTION
The command starts a menu-driven utility program permitting the user to retrieve status information, view the hardware configuration and to perform diagnostic testing on mux components (e.g. port modules). Displays are provided for: monitoring transmitted and/or received port data; observing RS232 modem control lead status; viewing port parameter settings; performing system card functionality tests; viewing the hardware and software configuration; viewing the topology. Running emux_diag The following conventions are used when running the utility: Arrow keys are used to move between menus and menu selections; Pressing the Enter key selects the highlighted menu item; Pressing the Esc key will backup one menu level; Pressing the F1 function key displays a context sensitive help; To exit from the utility, highlight from the main menu and press the Enter key. To start the diagnostic utility, type at the UNIX command prompt and press the Enter key. The Main Menu displays the following four selec- tions: DRIVER STATUS Use the right arrow key to position the cursor on the Driver Status selection and press the Enter key. A drop down menu displays the following four choices: Driver Status Board Status Counters Topology Driver Status Highlight and press the Enter key. The current configuration of the device driver and the number of boards found are displayed. This selection is commonly used to view the device driver version. Board Status Highlight and press the Enter key. Board specific information including board type, buffer block starting location, buffer size and bus slot location is displayed. Counters Highlight and press the Enter key. If more than one board is present, a board select vertical menu is presented. Highlight the board you wish to view counter status on and press the Enter key. Next, if the board you have selected is an expandable unit, the user is presented with a group select vertical menu. Each menu item represents a group of 8 or 16 ports. Highlight the desired group (e.g., Ports b1 through b16) and press the Enter key. The Counters screen is displayed showing the transmit and receive character counts for up to 16 ports (1 group). The Counters screen is updated in real-time, runs continuously and can be reset. This screen is very useful for locating ports loopbacked externally or ports currently communicating with a modem or other async device. Topology Highlight and press the Enter key. A pictorial representation of a host system card and port modules (if you are viewing an expandable board) attached to the host system card is displayed. The topology display is useful for troubleshooting problems with the expansion bus cable or for determining exactly what is connected to the host system. Exit the menu by pressing the Esc key. PORT STATUS
Use the right arrow key to position the cursor on the selection and press the Enter key. A drop down menu displays the following four choices: Breakout Box Data Scope Termio Register Dumps Breakout Box Highlight and press the Enter key. This selection displays the RS-232 lead status. You can check for modem DCD problems as well as the status of output flow control. Additionally, transmit rate, receive rate, total characters received, total characters transmitted and buffered data counters are displayed. This option can be use to determine how much communications activity has, and is currently taking place. It is also useful in troubleshooting wiring and flow control problems. Data Scope Highlight and press the Enter key. The user is presented with a form to configure: Device: This field allows you to specify the device to be monitored. Monitor: Specifies which direction is to be monitored - Input, Output or Both. Buffer: Specifies the size of the capture buffer - 32K, 64K or 128K. Buffer Full: In the event that the buffer becomes full, select whether the program stops or continues from the beginning of the buf- fer (wraparound). Display: Select whether or not the display shows the status of the flow control signals. Start: This is used to initiate real-time monitoring and display of the actual characters that are being sent and/or received by the port. Use this monitor display to obtain both hexadecimal and ASCII data. After data has been captured, you are given the opportunity to view the data using an ASCII/hexadecimal browser. Termio Highlight and press the Enter key. This selection displays general terminal interface data associated with the port. It is similar to the command in that it displays all enabled termio flags. Register Dump Highlight and press the Enter key. This option displays a real-time window of the port memory on the adapter card. The data is in raw form and only useful to HP technical personnel. It is used to obtain valuable information about the hardware status and various software flags. Exit the Port Status menu by pressing the Esc key. DIAGNOSTICS
Use the right arrow key to position the cursor on the selection and press the Enter key. A drop down menu displays the following two choices: Loopback Send Loopback Highlight and press the Enter key. A form requesting the following items is displayed. Speed: Specifies the baud rate or speed at which the ports will transfer data. Verify: Selects whether or not input data is verified. Update: Allows you to specify the frequency (in seconds) at which results are updated. Errors: Selects whether or not the program will stop when errors are encountered. Loop Type: Selects whether the ports use an internal or external loopback. Mode: Allows you to specify the mode in which the program will run. The loopback feature is designed to test the Mux card primary components and their functionality. The test can be run on a single port or a group of ports at the same time. The test does not require that the selected port(s) have the transmit and receive pins wired together. You have the option of running the test using an internal feature which loops back the data sent out. This simulates a loopback cable. Data is looped both toward the computer as well as toward the terminal. The program starts by writing a data pattern to the selected port(s) and reading the data back and comparing it to the pattern written out. The program reports, at regular intervals, the number of characters transmitted and received, errors and calculated receive rates. The data transmitted is an ascending pattern that starts at 1 decimal to 255 decimal. It is highly recommended (in external loopback mode) that the port(s) under test have all devices disconnected and have loopback connectors attached for tying the ports' transmit and receive signals together. Since control characters are being sent, any terminals or printers that are connected to the selected ports during the external loopback test may hang. Send Highlight and press the Enter key. The send display allows you to send a barber pole of ascending alphanumeric characters to the selected port. It then writes these printable characters back out of the port. This test is useful when adding a new device and a continuous stream of data is required to resolved wiring issues. The port configuration is 8 data bits, 1 stop bit and no parity. Exit the menu by pressing the Esc key. QUIT
Use the right arrow key to position the cursor on the selection and press the Enter key. A drop down menu displays the following choice: Quit To quit the program, highlight the Quit choice and press the Enter key. The screen returns to the UNIX prompt. AUTHOR
was developed by Equinox Systems, Inc. FILES
accesses the diagnostic files found in /dev/diag/mux<Instance>, /dev/diag/mux<Instance>_1, and /dev/diag/mux<Instance>_2. SEE ALSO
emux_stty(1), stty(1), termio(7), modem(7). emux_diag(1M)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy