Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glutkeyboardfunc(3glut) [osx man page]

glutKeyboardFunc(3GLUT) 					       GLUT						   glutKeyboardFunc(3GLUT)

NAME
glutKeyboardFunc - sets the keyboard callback for the current window. SYNTAX
#include <GLUT/glut.h> void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y)); ARGUMENTS
func The new keyboard callback function. DESCRIPTION
glutKeyboardFunc sets the keyboard callback for the current window. When a user types into the window, each key press generating an ASCII character will generate a keyboard callback. The key callback parameter is the generated ASCII character. The state of modifier keys such as Shift cannot be determined directly; their only effect will be on the returned ASCII data. The x and y callback parameters indicate the mouse location in window relative coordinates when the key was pressed. When a new window is created, no keyboard callback is initially registered, and ASCII key strokes in the window are ignored. Passing NULL to glutKeyboardFunc disables the generation of keyboard call- backs. During a keyboard callback, glutGetModifiers may be called to determine the state of modifier keys when the keystroke generating the call- back occurred. Use glutSpecialFunc for a means to detect non-ASCII key strokes. SEE ALSO
glutKeyboardUpFunc, glutSpecialFunc, glutCreateWindow, glutMouseFunc, glutSpaceballButtonFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutGetModifiers AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutKeyboardFunc(3GLUT)

Check Out this Related Man Page

glutKeyboardFunc(3GLUT) 					       GLUT						   glutKeyboardFunc(3GLUT)

NAME
glutKeyboardFunc - sets the keyboard callback for the current window. SYNTAX
void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y)); ARGUMENTS
func The new keyboard callback function. DESCRIPTION
glutKeyboardFunc sets the keyboard callback for the current window. When a user types into the window, each key press generating an ASCII character will generate a keyboard callback. The key callback parameter is the generated ASCII character. The state of modifier keys such as Shift cannot be determined directly; their only effect will be on the returned ASCII data. The x and y callback parameters indicate the mouse location in window relative coordinates when the key was pressed. When a new window is created, no keyboard callback is initially registered, and ASCII key strokes in the window are ignored. Passing NULL to glutKeyboardFunc disables the generation of keyboard call- backs. During a keyboard callback, glutGetModifiers may be called to determine the state of modifier keys when the keystroke generating the call- back occurred. Use glutSpecialFunc for a means to detect non-ASCII key strokes. SEE ALSO
glutKeyboardUpFunc, glutSpecialFunc, glutCreateWindow, glutMouseFunc, glutSpaceballButtonFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutGetModifiers AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutKeyboardFunc(3GLUT)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unix and keyboard

Hi, I need to set Unix I/O terminal such as once key "," is pressed charcter "." is shown. Do you have any suggesion? The best to me is to accomplish this feauture with an environment variabile if it is possible. Michele Ferrero (3 Replies)
Discussion started by: micfer
3 Replies

2. UNIX for Dummies Questions & Answers

how2 get single char from keyboard w/o enter

I am writing a bash shell menu and would like to get a char immediately after a key is pressed. This script does not work but should give you an idea of what I am trying to do.... Thanks for the help #! /bin/bash ANSWER="" echo -en "Choose item...\n" until do $ANSWER = $STDIN ... (2 Replies)
Discussion started by: jwzumwalt
2 Replies

3. Shell Programming and Scripting

Perl - Reading keyboard keystroke

Hello All, I wounder if any one know if perl have the ability to run script in the background which record each keyboard keystorke? If yes , how can I implement the part which reading the keyboard keystroke? Is there any moudle that handle it ? Thanks a head Alalush (1 Reply)
Discussion started by: Alalush
1 Replies

4. UNIX for Dummies Questions & Answers

Starting terminal with shortcut key combination

How can the shortcut keys be defined that would open up a terminal window? When using a kvm switch, the mouse sometimes does not work, but the keyboard does, and by opening up a terminal window using a shortcut key combination, the mouse can be restarted by entering the predefined mouserestart... (0 Replies)
Discussion started by: figaro
0 Replies

5. Shell Programming and Scripting

sh: Detect key (CTRL/SHIFT/CAPS LOCK) state?

I'm trying to write a shell script that runs periodically and if I'm not at the keyboard, it should do one thing, but if I am at the keyboard, it should do another thing. Therefore I've decided that it would be good if I could press down the CTRL key, (or some other key) and have the shell script... (8 Replies)
Discussion started by: Ilja
8 Replies

6. UNIX for Advanced & Expert Users

key 'm' not working

Ubuntu 8 box was rebooted and now when I press 'm' on the keyboard it is not shown on my display. This happens in bash, when I run ksh everything is normal. I am connected through SSH using SecureCRT, my bash is: BASH_VERSION='3.2.39(1)-release' I don't remember touching any of my... (3 Replies)
Discussion started by: migurus
3 Replies

7. Red Hat

Putty recognise keystroke wrongly!

Putty: release 0.58 Operating system: Linux, release 2.6.36-rc7 Problem: I use Putty to connet to server, initially everthing looks fine but after I browse some files, my keyboard acts funny, like if I keyin "cd", I got "je" on the screen. :wall: This only happens on some existing files but... (4 Replies)
Discussion started by: linwufei125
4 Replies