Пример #1
0
    def _default_keymap(self, force_local=False):
        if (not force_local and self.conn and
            support.check_conn_support(self.conn,
                                support.SUPPORT_CONN_KEYMAP_AUTODETECT)):
            return None

        if self._local_keymap == -1:
            from virtinst import hostkeymap
            self._local_keymap = hostkeymap.default_keymap()
        return self._local_keymap
Пример #2
0
    def _default_keymap(self, force_local=False):
        if self.type != "vnc" and self.type != "spice":
            return None

        if not force_local and self.conn.check_conn_support(self.conn.SUPPORT_CONN_KEYMAP_AUTODETECT):
            return None

        if self._local_keymap == -1:
            from virtinst import hostkeymap

            self._local_keymap = hostkeymap.default_keymap()
        return self._local_keymap