From 0a8dbb402b932e3815822fe28e82d8f63f5cb218 Mon Sep 17 00:00:00 2001
From: Ferdinand Thiessen <opensource@fthiessen.de>
Date: Wed, 11 Jun 2025 13:43:26 +0200
Subject: refactor(files): move hotkey handling to composable

This is a composable - not a service, because it is using the
`useHotKey` composable. At this moment it works, but in general
its only safe to put composables into `setup`-context.

This makes it future prove.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
---
 apps/files/src/FilesApp.vue | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'apps/files/src/FilesApp.vue')

diff --git a/apps/files/src/FilesApp.vue b/apps/files/src/FilesApp.vue
index 54821a03457..6fc02113162 100644
--- a/apps/files/src/FilesApp.vue
+++ b/apps/files/src/FilesApp.vue
@@ -12,11 +12,10 @@
 <script lang="ts">
 import { isPublicShare } from '@nextcloud/sharing/public'
 import { defineComponent } from 'vue'
-
 import NcContent from '@nextcloud/vue/components/NcContent'
-
 import Navigation from './views/Navigation.vue'
 import FilesList from './views/FilesList.vue'
+import { useHotKeys } from './composables/useHotKeys'
 
 export default defineComponent({
 	name: 'FilesApp',
@@ -28,6 +27,9 @@ export default defineComponent({
 	},
 
 	setup() {
+		// Register global hotkeys
+		useHotKeys()
+
 		const isPublic = isPublicShare()
 
 		return {
-- 
cgit v1.2.3

