keyremo.lst
来自「显示屏驱动源代码」· LST 代码 · 共 800 行 · 第 1/3 页
LST
800 行
250 2 case REMO_NUM2:
251 2 case REMO_NUM3:
252 2 case REMO_NUM4:
253 2 case REMO_NUM5:
254 2 case REMO_NUM6:
255 2 case REMO_NUM7:
256 2 case REMO_NUM8:
257 2 case REMO_NUM9:
258 2 #ifdef DEBUG_KEYREMO
dPrintf("\r\nNumber %02x Key Pressed, Autokey:%02x", (_RemoDataCode-0x30), AutoKey);
#endif
261 2 if( AutoKey ) return 1;
262 2
263 2 #ifdef SUPPORT_TV
else if( GetInputSelection() == TV ) EditTVChn( ToNumber(_RemoDataCode) );
#endif
266 2
267 2 else return 1;
268 2 break;
269 2
270 2 case REMO_CHNUP:
271 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nChannel UP");
#endif
274 2 RemoChnUp_UpKey();
275 2 break;
276 2
277 2 case REMO_CHNDN:
278 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nChannel DOWN");
#endif
281 2 RemoChnDn_DnKey();
282 2 break;
283 2
284 2 case REMO_SELECT:
285 2 #ifdef DEBUG_KEYREMO
dPrintf("\r\nSELECT key pressed, Autokey:%02x", AutoKey);
#endif
288 2 if( AutoKey ) return 1;
289 2 if( GetDisplayedOSD() & MENU ) {
290 3 OSDSelect();
291 3 }
292 2 break;
293 2
294 2 case REMO_VOLUP:
295 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nVolumn UP");
#endif
298 2 RemoVolUp_RightKey();
299 2 break;
300 2 case REMO_VOLDN:
301 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nVolumn DOWN");
C51 COMPILER V7.06 KEYREMO 02/21/2008 14:00:26 PAGE 6
#endif
304 2 RemoVolDn_LeftKey();
305 2 break;
306 2
307 2
308 2 case REMO_MENU:
309 2 #ifdef DEBUG_KEYREMO
dPrintf("\r\nMENU display, Autokey:%02x", AutoKey);
#endif
312 2 if( AutoKey ) return 1;
313 2 RemoMenu_MenuKey();
314 2 break;
315 2
316 2 case REMO_EXIT:
317 2 #ifdef DEBUG_KEYREMO
dPuts("\r\n EXIT");
#endif
320 2 if( GetDisplayedOSD() & MENU )
321 2 DoAction(EXITMENU);
322 2 break;
323 2
324 2 #ifdef SUPPORT_PC
325 2 case REMO_AUTO:
326 2 #ifdef DEBUG_KEYREMO
dPuts("\r\n AUTO mode adjust for PC input");
#endif
329 2 if( GetInputSelection()==PC )
330 2 AutoAdjust();
331 2 break;
332 2 #endif
333 2
334 2 #ifdef WIDE_SCREEN
335 2 case REMO_ASPECT:
336 2 #ifdef DEBUG_KEYREMO
dPuts("\r\n Screen Aspect Ratio change to WIDE");
#endif
339 2 SetItemValue(WIDESCREEN,UP);
340 2 break;
341 2 #endif
342 2 }
343 1
344 1 #ifdef PAL_TV
if(ChannelEdit_Flag) {
switch(_RemoDataCode) {
case REMO_TTXRED: ChannelEdit_Move(UP); break;
case REMO_TTXGREEN: ChannelEdit_Move(DN); break;
case REMO_TTXYELLOW: ChannelEdit_Skip(); break;
case REMO_TTXCYAN: ChannelEdit_Edit(); break;
}
}
#endif
354 1
355 1 #ifdef SUPPORT_DEBUG
switch(_RemoDataCode) {
case REMO_DEBUG: DebugWindowControl(); break;
case REMO_READ: Debug_Read(); break;
case REMO_WRITE: Debug_Write();
Debug_Read(); // Read back
break;
}
#endif
364 1
C51 COMPILER V7.06 KEYREMO 02/21/2008 14:00:26 PAGE 7
365 1 return 1;
366 1 }
367
368
369 BYTE CheckKeyIn(void)
370 {
371 1 BYTE ret=1, ikey;
372 1 // if( (ikey = keyIn()) ) {
373 1
374 1 if( (ikey = GetKey(1)) ) {
375 2 #ifdef DEBUG
376 2 switch (ikey) {
377 3 case POWERKEY : dPuts("\r\nPOWER key pressed"); break;
378 3 case MENUKEY: dPuts("\r\nMENU key pressed"); break;
379 3 case INPUTSOURCEKEY: dPuts("\r\nINPUTSOURCE key pressed"); break;
380 3 case UPKEY: dPuts("\r\nUP key pressed"); break;
381 3 case DOWNKEY: dPuts("\r\nDOWN key pressed"); break;
382 3 case LEFTKEY: dPuts("\r\nLEFT key pressed"); break;
383 3 case RIGHTKEY: dPuts("\r\nRIGHT key pressed"); break;
384 3 default: dPuts("\r\nNOT ASSIGNED key pressed"); break;
385 3 }
386 2 #endif
387 2
388 2 #if (defined SUPPORT_PC) || (defined SUPPORT_DTV)
389 2 if( (PcMode==EE_PC_NO_SIGNAL) && (GetInputSelection()==PC || GetInputSelection()==DTV) ) {
390 3 if( PcMode==EE_PC_NO_SIGNAL ) {
391 4 switch (ikey) {
392 5 case INPUTSOURCEKEY:
393 5 //case POWERKEY:
394 5 break;
395 5
396 5 default:
397 5 tic_pc = 0;
398 5 return 1;
399 5 }
400 4 }
401 3 }
402 2 #endif // SUPPORT_PC
403 2
404 2 SetOSDLastKeyInTime();
405 2
406 2 switch( ikey ) {
407 3
408 3 #ifdef POWERKEY
409 3 case POWERKEY :
410 3 ret = ActionRemo( REMO_STANDBY, RepeatKey ); break;
411 3 #endif
412 3
413 3 case MENUKEY:
414 3 ret = ActionRemo( REMO_MENU, RepeatKey ); break;
415 3
416 3 //------------------------------------------------------------------------
417 3 #ifdef SUPPORT_SELECTKEY
case UPKEY:
if( GetDisplayedOSD() & MENU )
if( OnChangingValue ) OSDValueUpDn(UP );
else OSDCursorMove( UP );
else
return 1;
break;
case DOWNKEY:
C51 COMPILER V7.06 KEYREMO 02/21/2008 14:00:26 PAGE 8
if( GetDisplayedOSD() & MENU )
if( OnChangingValue ) OSDValueUpDn(DN );
else OSDCursorMove( DN );
else
return 1;
break;
case SELECTKEY:
if( GetDisplayedOSD() & MENU ) {
if( OnChangingValue ) SaveValue1();
else OSDSelect();
}
break;
#else
442 3 //------------------------------------------------------------------------
443 3 case UPKEY: ret = ActionRemo( REMO_CHNUP, RepeatKey ); break;
444 3 case DOWNKEY: ret = ActionRemo( REMO_CHNDN, RepeatKey ); break;
445 3 case LEFTKEY: ret = ActionRemo( REMO_VOLDN, RepeatKey ); break;
446 3 case RIGHTKEY: ret = ActionRemo( REMO_VOLUP, RepeatKey ); break;
447 3 #endif
448 3 //------------------------------------------------------------------------
449 3
450 3 case INPUTSOURCEKEY:
451 3 ret = ActionRemo( REMO_INPUT, RepeatKey ); break;
452 3 }
453 2 // WaitKeyClear(ikey);
454 2 }
455 1 return (ret);
456 1 }
457
458 #ifdef INTERNAL_MCU
BYTE GetLAD0( void )
{
BYTE page, value;
page = ReadTW88(REG_PAGE);
WriteTW88(REG_PAGE, 0x00);
value = ReadTW88(LAD0);
WriteTW88(REG_PAGE,page);
return( value);
}
extern DATA BYTE tic01;
extern DATA BYTE keytic;
BYTE ReadKey( void )
{
BYTE i, j;
BYTE min, max;
WORD key_in;
/*
if( GetLAD0() < 0x10 ) {
keytic = 0;
return (0);
}
else
if ( keytic
keytic = tic01;
if( keytic==3 ) {
Key = _ReadKey();
C51 COMPILER V7.06 KEYREMO 02/21/2008 14:00:26 PAGE 9
RepeatKey = 0;
KeyReady = 1;
}
else if( keytic==100 ) {
Key = _ReadKey();
RepeatKey = 1;
KeyReady = 1;
keytic = 80;
}
keytic++;
}
*/
i = GetLAD0();
if ( i<0x10 ) return (0);
i = tic01;
do {
j = tic01 - i;
} while ( j < 3 ); //wait 30ms
i = GetLAD0();
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?