Select your printer model

Parameters are refined by the selected printer.

setKeyPressEventDelegate


Registers a callback method for a key press event.

Syntax

 
- (void) setKeyPressEventDelegate:(id<Epos2KbdKeyPressDelegate>)delegate;

Parameter

delegate

Specifies an object conforming to the Epos2KbdKeyPressDelegate protocol.

Protocol declaration

 
@protocol Epos2KbdKeyPressDelegate <NSObject>
@required
- (void) onKbdKeyPress:(Epos2Keyboard *)keyboardObj 
keyCode:(int)keyCode ascii:(NSString *)ascii;
@end

Parameter

keyboardObj

The callback source object is stored.

keyCode

The code of the pressed key is stored.

ascii

The character corresponding to the code of the pressed key is stored. If no character corresponds to the key code, "" (blank character) is stored.

Depending on the keyboard used, double-byte characters may be entered.

Supplementary explanation

  • When this API is run multiple times, the callback method specified later takes effect.
  • If nil is specified in delegate when calling this API, the registered callback method is canceled.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for iOS

Jump to the top