示例#1
0
文件: app.py 项目: xuhui/clay
    def keypress(self, size, key):
        """
        Handle keypress.
        Can switch tabs, control playback, flags, notifications and app state.
        """
        for tab in self.tabs:
            if 'meta {}'.format(tab.page.key) == key:
                self.set_page(tab.page.__class__.__name__)
                return

        hotkey_manager.keypress("global", self, super(AppWidget, self), size,
                                key)
示例#2
0
 def keypress(self, size, key):
     """
     Handle keypress.
     """
     return hotkey_manager.keypress("station_page", self,
                                    super(MyStationListItem, self), size,
                                    key)
示例#3
0
文件: myplaylists.py 项目: xuhui/clay
 def keypress(self, size, key):
     """
     Handle keypress.
     """
     return hotkey_manager.keypress("playlist_page", self,
                                    super(MyPlaylistListItem, self), size,
                                    key)
示例#4
0
文件: songlist.py 项目: xuhui/clay
    def keypress(self, size, key):
        if key in ascii_letters + digits + ' _-.,?!()[]/':
            self.perform_filtering(key)
        elif key == 'backspace':
            self.perform_filtering(key)
        elif self._is_filtering:
            try:
                return hotkey_manager.keypress("library_view", self, super(SongListBox, self),
                                               size, key)
            except IndexError:
                pass
        else:
            return super(SongListBox, self).keypress(size, key)

        return None
示例#5
0
文件: settings.py 项目: vale981/clay
 def keypress(self, _, key):
     """
     Handle equalizer band modification.
     """
     return hotkey_manager.keypress("settings_page", self, None, None, key)
示例#6
0
 def keypress(self, _, key):
     """
     Handle heypress.
     """
     return hotkey_manager.keypress("debug_page", self, None, None, key)
示例#7
0
 def keypress(self, size, key):
     """
     Handle keypress.
     """
     return hotkey_manager.keypress("library_item", self,
                                    super(SongListItem, self), size, key)
示例#8
0
文件: search.py 项目: vale981/clay
 def keypress(self, size, key):
     """
     Handle keypress.
     """
     return hotkey_manager.keypress("search_page", self,
                                    super(SearchBox, self), size, key)