Items LCD - hollie/misterhouse GitHub Wiki
See original
  my %lcd_keymap1 = ( N => 'up', I => 'down', M => 'left', H => 'right', F => 'exit', K => 'enter', L => 'left', G => 'right');
  my %lcd_keymap2 = ( 38=> 'up', 40=> 'down', 37=> 'left', 39=> 'right', 17=> 'exit', 96=> 'enter') ;
  $lcd1 = new LCD  'lcdproc', '192.168.0.5:13666', '4x20', 'default', \%lcd_keymap1;
  $lcd2 = new LCD 'keyboard',               undef, '4x20', 'mh',      \%lcd_keymap2;Send and receive data to LCD type displays with keypads
| Method | Description | 
|---|---|
new($type, $port, $size, $menu_group, $keymap) | 
$type:  Either lcdproc or keyboard.$port:  The ip:port of where lcdproc is running.$size:  ROWSxCOLUMNS of the LCD display.$menu_group:  The menu parsed by menu_parse (see Menu section of this doc).$keymap: A has that translates keys to usable names. | 
start | 
Connect to the LCD. Automatically called on startup | 
stop | 
Disconnect the LCD. | 
load($menu) | 
Load menu $menu. Default menu is the first one. | 
check_key | 
Returns whatever key is keyed in | 
set(@data) | 
Sends @data to the LCD, one line per list element | 
set_key($key) | 
Simulates the keyboard being pressed with $key | 
inactive | 
Returns true if no key has been pressed in 10 seconds. | 
An example is in mh/code/bruce/lcd.pl. To use simulate an LCD keypad with your pc keyboard, use mh/code/bruce/lcd_keyboard.pl.