Avery Dennison 6035 Programmer Manual Rev.CA 6/01 User Manual
Page 45
4-4 Programmer’s Manual
K b d R e s t o r e M o d e
Description
Changes the keypad’s data entry mode to the one saved
previously when the application called KbdGetMode.
Syntax
void KbdRestoreMode(int);
Parameters
1
Numeric/Normal mode
2
Upper-case Alpha mode
4
Lower-case Alpha mode (4-line/33-key version only)
Return Values
None
Example
#include <stdio.h>
#include <conio.h>
#include "mmsultra.h"
void main(void)
{
int iSavedmode = 0;
// Saved mode
int iInput = 0;
// Alpha key entered
iSavedmode = KbdGetMode();
// Save the current mode
// To Upper -case Alpha
KbdSetCaps();
printf("Press an alphabetic\nkey: "); // Test the mode
while (_kbhit())
;
iInput = _getch();
printf("\nYou pressed %c\n", iInput);
// Return to prev. mode
KbdRestoreMode(iSavedmode);
printf("\nPress the same key: ");
// Test the mode