mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 05:43:51 +02:00
Adding keyboard shortcut for direct access + Fixes for Linux clipboard reading (#1479)
* feat: add ctrl+d keyboard shortcut to open direct access * fix: make sure direct access promt only get shown once * fix: linux clipboard acess on non x11 systems xclip not present on all linux machines: using the electron mechanism instead
This commit is contained in:
@@ -198,7 +198,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
@@ -374,6 +374,13 @@
|
||||
openExternalLink('https://github.com/vrcx-team/VRCX');
|
||||
};
|
||||
|
||||
function handleKeydown(e) {
|
||||
if (e.ctrlKey && e.key === 'd') {
|
||||
e.preventDefault();
|
||||
directAccessPaste();
|
||||
}
|
||||
}
|
||||
|
||||
const supportLinks = {
|
||||
wiki: 'https://github.com/vrcx-team/VRCX/wiki',
|
||||
github: 'https://github.com/vrcx-team/VRCX',
|
||||
@@ -451,6 +458,11 @@
|
||||
if (!sentryErrorReporting.value) return;
|
||||
const feedback = Sentry.getFeedback();
|
||||
feedback?.attachTo(document.getElementById('feedback'));
|
||||
window.addEventListener('keydown', handleKeydown);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('keydown', handleKeydown);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user