mautilus / sdk

MAUTILUS SmartTV SDK
BSD 3-Clause "New" or "Revised" License
98 stars 43 forks source link

LG webos TV remote control not work with page up and page down button. #27

Closed kingctan closed 8 years ago

kingctan commented 8 years ago

LG webos TV remote control not work with page up and page down button. please check it. Thanks.

radimbuchtela commented 8 years ago

Hi kingctan, it should work fine. I tested it on LG webOS 1.0 and LG webOS 2.0.

Control.on('key', function(keycode) {
  if(keycode == Control.key.PUP) {  // keycode 33
    console.log('pressed key PUP');
  }
  if(keycode == Control.key.PDOWN) {  // keycode 34
    console.log('pressed key PDOWN');
  }
});

Only note: You should have a closed Debug console for proper propagation of PUP and PDOWN keyDown event. If Debug console has a open window, then PUP and PDOWN keydown event is internally used for scrolling of text inside this debug console window.

Radim

kingctan commented 8 years ago

OK thanks.