Sponsored Content
Top Forums Shell Programming and Scripting Python+Linux: CTRL-ALT-DEL Ncurses Utility Post 69299 by thmnetwork on Wednesday 13th of April 2005 07:56:42 PM
Old 04-13-2005
Python+Linux: CTRL-ALT-DEL Ncurses Utility

I have this NCurses utility that prompts for user input and takes action appropriately, I changed the default action for the three finger'd salute to run this utility instead of restarting the system.

This is a problem:

Printing to stdout happens immediately, but before anything else (such as taking user input ncurses-style, drawing a pad, etc) it seems to take a while. If I don't enter any keys on the keyboard it doesn't draw it ever. I have to enter a few keys on the keyboard, and after a few utilites are ran, it finally pops up the pads and stuff, but with the 0,0 coordinate refering to the leftmost of the next line...

if my explanation was unclear, then I'll elaborate...
 

5 More Discussions You Might Find Interesting

1. AIX

Disable ctrl-c,ctrl-d,ctrl-d in ksh script

I wrote a ksh script for Helpdesk. I need to know how to disable ctrl-c,ctrl-z,ctrl-d..... so that helpdesk would not be able to get to system prompt :confused: (6 Replies)
Discussion started by: wtofu
6 Replies

2. Linux

GUI for a Linux router - WWW or ncurses Dialog ?

Hi, Linux router is my only "full" Linux application. I native compiled and installed Linux Unix dialog utility. Dialog comes with a limited set of objects, called widgets. Some work fine, some need improvements. But what I really need is graphical interface to shell scripts run on my... (0 Replies)
Discussion started by: jack2
0 Replies

3. Programming

Do you know whether ncurses supports Alt or Ctrl combination keys

I'm new in ncurses. I'd like to ask one question. Do you know whether ncurses supports Alt or Ctrl combination keys? Our application wants to get response when inputting Alt or Ctrl combination keys by keyboard in one linux c project. I try one testing on ncurses, it seems ncurses doesn't... (3 Replies)
Discussion started by: liuyan03
3 Replies

4. UNIX for Dummies Questions & Answers

Ctrl-V + Ctrl-J for newline character does not work inside vi editor

Hi friends, I am trying to add a newline char ('\n') between the query and the commit statement in the following shell script. #! /bin/sh echo "select * from tab; commit;" > data.sql I have tried typing in "Ctrl-V + Ctrl-J" combination which has inserted ^@ (NUL) character but the commit... (1 Reply)
Discussion started by: royalibrahim
1 Replies

5. UNIX for Beginners Questions & Answers

Samba - Change passwd from client with ctrl + alt + del

Hello, I got a very strange issue using samba. From a Windows 7 client that joined the domain, i want to change a user password. Here is what i am doing exactly : Loging into the domain account, with username and password. Pressing ctrl + alt + del Clic on Change password menu Enter old... (8 Replies)
Discussion started by: Purgator
8 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 06:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy