📄 keyremo.lst
字号:
238 2
239 2 case REMO_CHNUP:
240 2 #ifdef DEBUG_KEYREMO
C51 COMPILER V7.50 KEYREMO 04/01/2008 15:02:11 PAGE 5
dPuts("\r\nChannel UP");
#endif
243 2 RemoChnUp_UpKey();
244 2 break;
245 2
246 2 case REMO_CHNDN:
247 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nChannel DOWN");
#endif
250 2 RemoChnDn_DnKey();
251 2 break;
252 2
253 2 case REMO_SELECT:
254 2 #ifdef DEBUG_KEYREMO
dPrintf("\r\nSELECT key pressed, Autokey:%02x", AutoKey);
#endif
257 2 if( AutoKey ) return 1;
258 2 if( GetDisplayedOSD() & MENU ) {
259 3 OSDSelect();
260 3 }
261 2 break;
262 2
263 2 case REMO_VOLUP:
264 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nVolumn UP");
#endif
267 2 RemoVolUp_RightKey();
268 2 break;
269 2 case REMO_VOLDN:
270 2 #ifdef DEBUG_KEYREMO
dPuts("\r\nVolumn DOWN");
#endif
273 2 RemoVolDn_LeftKey();
274 2 break;
275 2
276 2
277 2 case REMO_MENU:
278 2 #ifdef DEBUG_KEYREMO
dPrintf("\r\nMENU display, Autokey:%02x", AutoKey);
#endif
281 2 if( AutoKey ) return 1;
282 2 RemoMenu_MenuKey();
283 2 break;
284 2
285 2 case REMO_EXIT:
286 2 #ifdef DEBUG_KEYREMO
dPuts("\r\n EXIT");
#endif
289 2 if( GetDisplayedOSD() & MENU )
290 2 DoAction(EXITMENU);
291 2 break;
292 2
293 2 #ifdef SUPPORT_PC
294 2 case REMO_AUTO:
295 2 #ifdef DEBUG_KEYREMO
dPuts("\r\n AUTO mode adjust for PC input");
#endif
298 2 if( GetInputSelection()==PC )
299 2 AutoAdjust();
300 2 break;
301 2 #endif
302 2
C51 COMPILER V7.50 KEYREMO 04/01/2008 15:02:11 PAGE 6
303 2 #ifdef WIDE_SCREEN
304 2 case REMO_ASPECT:
305 2 #ifdef DEBUG_KEYREMO
dPuts("\r\n Screen Aspect Ratio change to WIDE");
#endif
308 2 SetItemValue(WIDESCREEN,UP);
309 2 break;
310 2 #endif
311 2 }
312 1
313 1 #ifdef PAL_TV
314 1 if(ChannelEdit_Flag) {
315 2 switch(_RemoDataCode) {
316 3 case REMO_TTXRED: ChannelEdit_Move(UP); break;
317 3 case REMO_TTXGREEN: ChannelEdit_Move(DN); break;
318 3 case REMO_TTXYELLOW: ChannelEdit_Skip(); break;
319 3 case REMO_TTXCYAN: ChannelEdit_Edit(); break;
320 3 }
321 2 }
322 1 #endif
323 1
324 1 return 1;
325 1 }
326
327
328 BYTE CheckKeyIn(void)
329 {
330 1 BYTE ret=1, ikey;
331 1 // if( (ikey = keyIn()) ) {
332 1
333 1 if( (ikey = GetKey(1)) ) {
334 2 #ifdef DEBUG
335 2 switch (ikey) {
336 3 case POWERKEY : dPuts("\r\nPOWER key pressed"); break;
337 3 case MENUKEY: dPuts("\r\nMENU key pressed"); break;
338 3 case INPUTSOURCEKEY: dPuts("\r\nINPUTSOURCE key pressed"); break;
339 3 case UPKEY: dPuts("\r\nUP key pressed"); break;
340 3 case DOWNKEY: dPuts("\r\nDOWN key pressed"); break;
341 3 case LEFTKEY: dPuts("\r\nLEFT key pressed"); break;
342 3 case RIGHTKEY: dPuts("\r\nRIGHT key pressed"); break;
343 3 default: dPuts("\r\nNOT ASSIGNED key pressed"); break;
344 3 }
345 2 #endif
346 2
347 2 #if (defined SUPPORT_PC) || (defined SUPPORT_DTV)
348 2 if( (PcMode==EE_PC_NO_SIGNAL) && (GetInputSelection()==PC || GetInputSelection()==DTV) ) {
349 3 if( PcMode==EE_PC_NO_SIGNAL ) {
350 4 switch (ikey) {
351 5 case INPUTSOURCEKEY:
352 5 //case POWERKEY:
353 5 break;
354 5
355 5 default:
356 5 tic_pc = 0;
357 5 return 1;
358 5 }
359 4 }
360 3 }
361 2 #endif // SUPPORT_PC
362 2
363 2 SetOSDLastKeyInTime();
364 2
C51 COMPILER V7.50 KEYREMO 04/01/2008 15:02:11 PAGE 7
365 2 switch( ikey ) {
366 3
367 3 #ifdef POWERKEY
368 3 case POWERKEY :
369 3 ret = ActionRemo( REMO_STANDBY, RepeatKey ); break;
370 3 #endif
371 3
372 3 case MENUKEY:
373 3 ret = ActionRemo( REMO_MENU, RepeatKey ); break;
374 3
375 3 //------------------------------------------------------------------------
376 3 #ifdef SUPPORT_SELECTKEY
case UPKEY:
if( GetDisplayedOSD() & MENU )
if( OnChangingValue ) OSDValueUpDn(UP );
else OSDCursorMove( UP );
else
return 1;
break;
case DOWNKEY:
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
401 3 //------------------------------------------------------------------------
402 3 case UPKEY: ret = ActionRemo( REMO_CHNUP, RepeatKey ); break;
403 3 case DOWNKEY: ret = ActionRemo( REMO_CHNDN, RepeatKey ); break;
404 3 case LEFTKEY: ret = ActionRemo( REMO_VOLDN, RepeatKey ); break;
405 3 case RIGHTKEY: ret = ActionRemo( REMO_VOLUP, RepeatKey ); break;
406 3 #endif
407 3 //------------------------------------------------------------------------
408 3
409 3 case INPUTSOURCEKEY:
410 3 ret = ActionRemo( REMO_INPUT, RepeatKey ); break;
411 3 }
412 2 // WaitKeyClear(ikey);
413 2 }
414 1 return (ret);
415 1 }
416
417 #ifdef INTERNAL_MCU
418
419
420 BYTE GetLAD0( void )
421 {
422 1 BYTE page, value;
423 1 page = ReadTW88(REG_PAGE);
424 1 WriteTW88(REG_PAGE, 0x00);
425 1 value = ReadTW88(LAD0);
426 1 WriteTW88(REG_PAGE,page);
C51 COMPILER V7.50 KEYREMO 04/01/2008 15:02:11 PAGE 8
427 1 return( value);
428 1 }
429
430 extern DATA BYTE tic01;
431 extern DATA BYTE keytic;
432
433 BYTE ReadKey( void )
434 {
435 1 BYTE i, j;
436 1 BYTE min, max;
437 1 WORD key_in;
438 1 /*
439 1 if( GetLAD0() < 0x10 ) {
440 1 keytic = 0;
441 1 return (0);
442 1 }
443 1 else
444 1 if ( keytic
445 1 keytic = tic01;
446 1 if( keytic==3 ) {
447 1 Key = _ReadKey();
448 1 RepeatKey = 0;
449 1 KeyReady = 1;
450 1 }
451 1 else if( keytic==100 ) {
452 1 Key = _ReadKey();
453 1 RepeatKey = 1;
454 1 KeyReady = 1;
455 1 keytic = 80;
456 1 }
457 1 keytic++;
458 1 }
459 1 */
460 1 i = GetLAD0();
461 1 if ( i<0x10 ) return (0);
462 1 i = tic01;
463 1 do {
464 2 j = tic01 - i;
465 2 } while ( j < 3 ); //wait 30ms
466 1
467 1 i = GetLAD0();
468 1 if ( i<0x10 ) return (0);
469 1 key_in = i;
470 1 min = i; max = i;
471 1 for ( j=0; j<17; j++ ) {
472 2 i = GetLAD0();
473 2 if ( i<0x10 ) return (0);
474 2 key_in += i;
475 2 if ( i < min ) min = i;
476 2 else if ( i > max ) max = i;
477 2 }
478 1 key_in -= min;
479 1 key_in -= max;
480 1
481 1 key_in >>= 4; // divide by 16
482 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -