Skip to content

feat(keyboard): add haptic feedback on key press#639

Open
prince-0408 wants to merge 2 commits intoscribe-org:mainfrom
prince-0408:feat/haptic-feedback-key-press
Open

feat(keyboard): add haptic feedback on key press#639
prince-0408 wants to merge 2 commits intoscribe-org:mainfrom
prince-0408:feat/haptic-feedback-key-press

Conversation

@prince-0408
Copy link
Copy Markdown
Contributor

Summary

Adds tactile feedback to all Scribe keyboard key presses using Apple's native UIImpactFeedbackGenerator. This is one of the most noticeable gaps compared to the system keyboard and other third-party keyboards.

Closes #638

Changes

File Type Description
KeyboardViewController.swift Modified Haptic feedback added in keyTouchDown

Haptic Intensity Map

Intensity Keys
Heavy delete, hideKeyboard
Medium shift, return, space, ABC, 123, #+=, .?123, selectKeyboard, capsLock, indent, Translate, Conjugate, Plural, autocomplete / emoji / annotation / nav keys
Light All regular character keys (a–z, numbers, symbols, punctuation)

Notes

  • UIImpactFeedbackGenerator is Apple-native — no new dependencies
  • Fires independently of the system "Keyboard Clicks" sound setting
  • Purely additive — zero existing logic changed

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Thank you for the pull request! 💙🩵

The Scribe-iOS team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and iOS rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the General room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the CI unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Copy Markdown
Member

Did you also include a menu option to turn this off, @prince-0408? Should also be off by default I would say, as I don't think that it's on by default for the system keyboards. This option should be within the keyboard sub-settings pages, not the main app settings page.

I'm not sure if there's a Scribe-i18n entry for this now, so I could add that for you and for now you can hard code the strings for the option.

@prince-0408
Copy link
Copy Markdown
Contributor Author

Appreciate the feedback, @andrewtavis!

I completely agree, and yes, it should be off by default and user-controlled.

I'll add a toggle in the keyboard sub-settings page, along with the other sub-settings, and wire it up to only send haptics if the user has enabled the feature.

I'll hard code the strings for now until the i18n entry is added.

Will push an update to this PR shortly!

…cribe-org#638

- Add hapticFeedback case to UserInteractiveState enum
- Add 'Haptic feedback' toggle to Functionality section in
  languageSettingsData (keyboard sub-settings page, not main settings)
- Handle save/load of langCode+HapticFeedback UserDefaults key in
  InfoChildTableViewCell (switchDidChange + fetchSwitchStateForCell)
- Add hapticFeedbackIsEnabled() in KeyboardViewController reading from
  shared UserDefaults container
- Guard haptic block behind hapticFeedbackIsEnabled() — off by default
- Strings hard-coded for now pending Scribe-i18n entry
@prince-0408 prince-0408 force-pushed the feat/haptic-feedback-key-press branch from 93e8d33 to e4f939a Compare April 1, 2026 18:22
@prince-0408 prince-0408 changed the title feat(keyboard): add haptic feedback on key press #638 feat(keyboard): add haptic feedback on key press Apr 1, 2026
@prince-0408
Copy link
Copy Markdown
Contributor Author

Hey @andrewtavis, done! Here's what was added:

  1. A "Haptic feedback" toggle in the keyboard sub-settings page under the Functionality section (alongside "Double space periods", "Autosuggest emojis", etc.)
  2. Off by default — no haptics fire unless the user explicitly enables it
  3. Strings are hard-coded for now, ready to be swapped once the i18n entry is added

Let me know if anything needs adjusting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add haptic feedback on key press for Scribe keyboards

2 participants