length < 2) {
            lastTouchDistance = 0
          }
        }

        // Handle key down (space key for drag mode toggle)
        const handleKeyDown = (e) => {
          if (e.code === 'Space' && !isSpacePressed.value) {
            if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') {
              return
            }
            isSpacePressed.value = true
            e.preventDefault()
          }
        }

        // Handle key up
        const ha