<screen name="Dish" flags="wfNoBorder" position="300,100" size="130,160" title="Dish" zPosition="100" backgroundColor="transparent">
<widget name="Dishpixmap" pixmap="skin_default/icons/dish.png" position="0,0" size="130,160" alphatest="off" />
</screen>
+ <!-- unhandled key pressed -->
+ <screen name="UnhandledKey" flags="wfNoBorder" position="620,50" size="34,45" title="UnhandledKey" zPosition="100" backgroundColor="transparent">
+ <widget name="UnhandledKeyPixmap" pixmap="skin_default/unhandled-key.png" position="0,0" size="34,45" alphatest="off" />
+ </screen>
<!-- EPG Selection - Single -->
<screen name="EPGSelection" position="center,center" size="560,430" title="EPG Selection">
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
sleeptimer.png \
timeline-now.png \
timeline.png \
+ unhandled-key.png \
verticalline-plugins.png \
vkey_backspace.png \
vkey_bg.png \
from Screens.InfoBarGenerics import InfoBarShowHide, \
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarRdsDecoder, \
InfoBarEPG, InfoBarSeek, InfoBarInstantRecord, \
- InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \
+ InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarUnhandledKey, \
InfoBarSubserviceSelection, InfoBarShowMovies, InfoBarTimeshift, \
InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \
InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \
class InfoBar(InfoBarBase, InfoBarShowHide,
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder,
InfoBarInstantRecord, InfoBarAudioSelection,
- HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish,
+ HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarUnhandledKey,
InfoBarSubserviceSelection, InfoBarTimeshift, InfoBarSeek,
InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions,
InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarServiceErrorPopupSupport, InfoBarJobman,
for x in HelpableScreen, \
InfoBarBase, InfoBarShowHide, \
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, \
- InfoBarInstantRecord, InfoBarAudioSelection, \
+ InfoBarInstantRecord, InfoBarAudioSelection, InfoBarUnhandledKey, \
InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \
InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \
InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, \
from Screens.SubtitleDisplay import SubtitleDisplay
from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive
from Screens.TimeDateInput import TimeDateInput
+from Screens.UnhandledKey import UnhandledKey
from ServiceReference import ServiceReference
from Tools import Notifications
from Tools.Directories import fileExists
from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \
- iPlayableService, eServiceReference, eEPGCache
+ iPlayableService, eServiceReference, eEPGCache, eActionMap
from time import time, localtime, strftime
from os import stat as os_stat
def __init__(self):
self.dishDialog = self.session.instantiateDialog(Dish)
+class InfoBarUnhandledKey:
+ def __init__(self):
+ self.unhandledKeyDialog = self.session.instantiateDialog(UnhandledKey)
+ self.hideTimer = eTimer()
+ self.hideTimer.callback.append(self.unhandledKeyDialog.hide)
+ self.checkUnusedTimer = eTimer()
+ self.checkUnusedTimer.callback.append(self.checkUnused)
+ self.onLayoutFinish.append(self.unhandledKeyDialog.hide)
+ eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self.actionA) #highest prio
+ eActionMap.getInstance().bindAction('', 0x7FFFFFFF, self.actionB) #lowest prio
+ self.key = -1;
+ self.flags = 0;
+ self.uflags = 0;
+
+ #this function is called on every keypress!
+ def actionA(self, key, flag):
+ if flag != 4:
+ if self.key != key:
+ if self.checkUnusedTimer.isActive():
+ self.checkUnusedTimer.stop()
+ self.checkUnused()
+ self.key = key
+ self.flags = self.uflags = 0
+ self.flags |= (1<<flag)
+ if flag == 1: # break
+ self.checkUnusedTimer.start(0, True)
+ return 0
+
+ #this function is only called when no other action has handled this key
+ def actionB(self, key, flag):
+ if flag != 4:
+ self.uflags |= (1<<flag)
+
+ def checkUnused(self):
+ if self.flags == self.uflags:
+ self.unhandledKeyDialog.show()
+ self.hideTimer.start(2000, True)
+
class InfoBarShowHide:
""" InfoBar show/hide control, accepts toggleShow and hide actions, might start
fancy animations. """
SubtitleDisplay.py SubservicesQuickzap.py ParentalControlSetup.py NumericalTextInputHelpDialog.py \
SleepTimerEdit.py Ipkg.py RdsDisplay.py Globals.py DefaultWizard.py \
SessionGlobals.py LocationBox.py WizardLanguage.py TaskView.py Rc.py VirtualKeyBoard.py \
- TextBox.py FactoryReset.py RecordPaths.py
+ TextBox.py FactoryReset.py RecordPaths.py UnhandledKey.py
--- /dev/null
+from Screen import Screen
+from Components.Pixmap import Pixmap
+
+class UnhandledKey(Screen):
+ def __init__(self, session):
+ Screen.__init__(self, session)
+ self["UnhandledKeyPixmap"] = Pixmap()