fix: use shift+r for reminder shortcut on apple devices

This commit is contained in:
kolaente
2025-11-26 23:57:47 +01:00
parent 869bb6e014
commit 2976d6f676
2 changed files with 8 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import type {RouteLocation} from 'vue-router'
import {isAppleDevice} from '@/helpers/isAppleDevice'
const ctrl = isAppleDevice() ? '⌘' : 'ctrl'
const reminderModifier = isAppleDevice() ? 'shift' : 'alt'
export interface Shortcut {
title: string
@@ -182,7 +183,7 @@ export const KEYBOARD_SHORTCUTS: ShortcutGroup[] = [
},
{
title: 'keyboardShortcuts.task.reminder',
keys: ['alt', 'r'],
keys: [reminderModifier, 'r'],
},
{
title: 'keyboardShortcuts.task.description',

View File

@@ -539,7 +539,7 @@
{{ $t('task.detail.actions.endDate') }}
</XButton>
<XButton
v-shortcut="'Alt+r'"
v-shortcut="reminderShortcut"
variant="secondary"
:icon="['far', 'clock']"
@click="setFieldActive('reminders')"
@@ -640,6 +640,7 @@ import Reactions from '@/components/input/Reactions.vue'
import {uploadFile} from '@/helpers/attachments'
import {getProjectTitle} from '@/helpers/getProjectTitle'
import {isAppleDevice} from '@/helpers/isAppleDevice'
import {scrollIntoView} from '@/helpers/scrollIntoView'
import {TASK_REPEAT_MODES} from '@/types/IRepeatMode'
import {playPopSound} from '@/helpers/playPop'
@@ -710,6 +711,10 @@ const lastProject = computed(() => {
const lastProjectOrTaskProject = computed(() => lastProject.value ?? project.value)
// Use Shift+R on macOS (Alt+R produces special characters depending on keyboard layout)
// Use Alt+r on other platforms
const reminderShortcut = computed(() => isAppleDevice() ? 'Shift+R' : 'Alt+r')
onMounted(() => {
document.addEventListener('keydown', saveTaskViaHotkey)
})