Skip to content

Commit

Permalink
Merge pull request #11 from shilokuma-inc/feat/shortcut
Browse files Browse the repository at this point in the history
【CHORE】Xcode, GitHub. Slackのショートカットを追加
  • Loading branch information
mrs1669 authored May 19, 2024
2 parents 3faad40 + ad05648 commit f9f7a8b
Show file tree
Hide file tree
Showing 2 changed files with 211 additions and 1 deletion.
211 changes: 210 additions & 1 deletion QuickKeyAssistantApp/QuickKeyAssistantApp/MenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,217 @@
import SwiftUI

struct MenuView: View {
@State private var isHoveredGitHub = false
@State private var isHoveredSlack = false

var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
ScrollView {
VStack(alignment: .leading, spacing: 8) {
Text("Xcode")
.foregroundStyle(.gray)

HStack {
Text("Run")

Spacer()

Text("⌘ R")
.foregroundStyle(.gray)
}

HStack {
Text("Test")

Spacer()

Text("⌘ U")
.foregroundStyle(.gray)
}

HStack {
Text("Build")

Spacer()

Text("⌘ B")
.foregroundStyle(.gray)
}

HStack {
Text("Comment out")

Spacer()

Text("⌘ /")
.foregroundStyle(.gray)
}

HStack {
Text("Indentation")

Spacer()

Text("^ I")
.foregroundStyle(.gray)
}

HStack {
Text("Rename")

Spacer()

Text("⌘ ^ E")
.foregroundStyle(.gray)
}

Divider()

Text("Simulator")
.foregroundStyle(.gray)

HStack {
Text("Screenshot")

Spacer()

Text("⌘ S")
.foregroundStyle(.gray)
}

HStack {
Text("Record")

Spacer()

Text("⌘ S")
.foregroundStyle(.gray)
}

HStack {
Text("Home")

Spacer()

Text("⌘ ⇧ H")
.foregroundStyle(.gray)
}

HStack {
Text("Lock")

Spacer()

Text("⌘ L")
.foregroundStyle(.gray)
}

HStack {
Text("Rotate LR")

Spacer()

Text("⌘ ←→")
.foregroundStyle(.gray)
}

HStack {
Text("Shake")

Spacer()

Text("⌘ ^ Z")
.foregroundStyle(.gray)
}

HStack {
Text("Keyboard I/O")

Spacer()

Text("⌘ K")
.foregroundStyle(.gray)
}

HStack {
Text("Input Mac Keyboard")

Spacer()

Text("⌘ ⇧ K")
.foregroundStyle(.gray)
}

Divider()

Text("GitHub")
.foregroundStyle(.gray)

HStack {
Text("Issue Tab")

Spacer()

Text("G I")
.foregroundStyle(.gray)
}

HStack {
Text("Pull requets Tab")

Spacer()

Text("G P")
.foregroundStyle(.gray)
}

ZStack(alignment: .leading) {
if isHoveredGitHub {
Color.gray.opacity(0.3)
}
Text("Official Documents")
.onHover { hovered in
self.isHoveredGitHub = hovered
}
.onTapGesture {
if let url = URL(string: "https://docs.github.com/en/get-started/accessibility/keyboard-shortcuts") {
NSWorkspace.shared.open(url)
}
}
}

Divider()

Text("Slack")
.foregroundStyle(.gray)

HStack {
Text("All read")

Spacer()

Text("⇧ esc")
.foregroundStyle(.gray)
}

ZStack(alignment: .leading) {
if isHoveredSlack {
Color.gray.opacity(0.3)
}
Text("Official Documents")
.onHover { hovered in
self.isHoveredSlack = hovered
}
.onTapGesture {
if let url = URL(string: "https://slack.com/intl/en-gb/help/articles/201374536-Slack-keyboard-shortcuts-and-commands") {
NSWorkspace.shared.open(url)
}
}
}
}
.padding(16)
}
.frame(width: 200)
.frame(maxHeight: 400)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ struct QuickKeyAssistantApp: App {
Text("")
}
}
.menuBarExtraStyle(.window)
}
}

0 comments on commit f9f7a8b

Please sign in to comment.