Skip to content

Commit

Permalink
Add escape and send keyboard shortcuts for Assist (#2766)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
  • Loading branch information
bgoncal authored May 7, 2024
1 parent 8f125d7 commit b8780f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/App/Assist/AssistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct AssistView: View {
}
.buttonStyle(.plain)
.tint(Color(uiColor: .label))
.keyboardShortcut(.cancelAction)
}

private var pickerMaxWidth: CGFloat? {
Expand Down Expand Up @@ -164,6 +165,7 @@ struct AssistView: View {
.font(.system(size: 32))
.tint(Color.asset(Asset.Colors.haPrimary))
.animation(.smooth, value: viewModel.isRecording)
.keyboardShortcut(.defaultAction)
}

private var assistMicButton: some View {
Expand Down

0 comments on commit b8780f7

Please sign in to comment.