Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Keyboard Analyzer

![](https://img.shields.io/badge/Windows-Ok-brightgreen) ![](https://img.shields.io/badge/Android-Ok-brightgreen) ![](https://img.shields.io/badge/MacOS-Bugs-red)
---

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S5E6K74)

Expand All @@ -13,7 +13,6 @@
<video src="https://user-images.githubusercontent.com/50235526/185812119-392b895c-ebd5-48df-accf-98933ef8a234.mp4" controls></video>
</details>


## About

With this plugin you will be able to:
Expand All @@ -36,9 +35,9 @@ grateful for any help with testing support.

## Installation

As plugin is not yet published in community plugins library, you will need to install it manually or with
help of [BRAT](https://github.com/TfTHacker/obsidian42-brat) plugin for beta
testing.
As plugin is not yet published in community plugins library, you will need to
install it manually or with help of
[BRAT](https://github.com/TfTHacker/obsidian42-brat) plugin for beta testing.

#### Manual Installation

Expand Down
8,778 changes: 4,549 additions & 4,229 deletions main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "keyboard-analyzer",
"name": "Keyboard Analyzer",
"version": "0.1.3",
"minAppVersion": "0.12.10",
"minAppVersion": "1.0.0",
"description": "See and analyse your keyboard hotkeys and shortcuts",
"author": "cogscides",
"authorUrl": "https://github.com/cogscides",
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-typescript": "^8.3.1",
"@types/node": "^14.18.12",
"obsidian": "^0.15.9",
"rollup": "^2.70.1",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-typescript": "^12.1.2",
"@types/node": "^14.18.63",
"obsidian": "^1.8.7",
"rollup": "^2.79.2",
"rollup-plugin-ignore": "^1.0.10",
"rollup-plugin-svelte": "^7.1.0",
"sanitize-html": "^2.7.0",
"source-map-js": "^0.6.2",
"svelte": "^3.44.2",
"svelte-check": "^1.6.0",
"svelte-preprocess": "^4.10.4",
"tslib": "^2.3.1",
"typescript": "^4.6.3"
"rollup-plugin-svelte": "^7.2.2",
"sanitize-html": "^2.15.0",
"source-map-js": "^1.2.1",
"svelte": "^3.59.2",
"svelte-check": "^2.10.3",
"svelte-preprocess": "^5.1.4",
"tslib": "^2.8.1",
"typescript": "^4.9.5"
},
"dependencies": {
"@tsconfig/svelte": "^2.0.1",
"lucide-svelte": "^0.84.0",
"@tsconfig/svelte": "^3.0.0",
"lucide-svelte": "^0.200.0",
"obsidian-community-lib": "^2.0.2",
"standard-version": "^9.3.2",
"standard-version": "^9.5.0",
"svelte-icons": "^2.1.0",
"svelte-use-click-outside": "^1.0.0",
"svelte-watch-resize": "^1.0.3"
Expand Down
2 changes: 1 addition & 1 deletion src/AppShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function isCustomizedHotkey(id: string, hotkey: Hotkey, app: App) {
}

// return true if hotkey duplicated with other hotkey
export function isHotkeyDuplicate(commandID: string, hotkey: Hotkey) {
export function isHotkeyDuplicate(commandID: string, hotkey: Hotkey, app: App) {
let isDuplicate = false
let commands = getHotkeysV2(app)
for (let command of Object.entries(commands)) {
Expand Down
6 changes: 3 additions & 3 deletions src/Components/CommandsList.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type { Hotkey } from 'obsidian'
import type { App, Hotkey } from 'obsidian'
import type { commandsArray, PluginSettings } from 'src/Interfaces'
// @ts-ignore
import { flip } from 'svelte/animate'
Expand All @@ -16,8 +16,8 @@
import { Star as StarIcon } from 'lucide-svelte'

export let visibleCommands: commandsArray

export let settings: PluginSettings
export let app: App

function renderHotkey(hotkey: Hotkey) {
let modifiersString =
Expand Down Expand Up @@ -86,7 +86,7 @@
<div class="kbanalizer-setting-item-control setting-item-control">
<div class="setting-command-hotkeys">
{#each cmdEntry.hotkeys as hotkey}
{#if isHotkeyDuplicate(cmdEntry.id, hotkey)}
{#if isHotkeyDuplicate(cmdEntry.id, hotkey, app)}
<span
class="kbanalizer-setting-hotkey setting-hotkey is-duplicate"
class:is-duplicate={settings.filterSettings
Expand Down
1 change: 1 addition & 0 deletions src/Components/KeyboardComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@
<CommandsList
bind:visibleCommands
bind:settings
{app}
on:star-clicked={handleStarIconClicked}
on:duplicate-hotkey-clicked={handleDuplicateHotkeyClicked}
on:plugin-name-clicked={handlePluginNameClicked}
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {
Modal,
Notice,
Plugin,
Hotkey,
PluginSettingTab,
setIcon,
Setting,
WorkspaceLeaf,
} from 'obsidian'
import type { Hotkey } from 'obsidian'
import { openView, wait } from 'obsidian-community-lib'
import ShortcutsView from 'src/ShortcutsView'
// @ts-ignore
Expand Down
13 changes: 9 additions & 4 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,12 @@ kbd.modifier:hover {
padding-top: 24px;
padding-right: 32px;
padding-bottom: 16px;
box-shadow: 0px 45px 18px rgba(5, 5, 5, 0.01),
0px 25px 15px rgba(5, 5, 5, 0.03), 0px 11px 11px rgba(5, 5, 5, 0.04),
0px 3px 6px rgba(5, 5, 5, 0.05), 0px 0px 0px rgba(5, 5, 5, 0.05);
box-shadow:
0px 45px 18px rgba(5, 5, 5, 0.01),
0px 25px 15px rgba(5, 5, 5, 0.03),
0px 11px 11px rgba(5, 5, 5, 0.04),
0px 3px 6px rgba(5, 5, 5, 0.05),
0px 0px 0px rgba(5, 5, 5, 0.05);
}

/* .is-mobile .popup-filter-menu-container { */
Expand Down Expand Up @@ -513,7 +516,9 @@ button#hotkey-refresh-button:hover {
min-height: 24px;
align-self: flex-end;
position: relative;
transition: background-color, color 0.5s ease;
transition:
background-color,
color 0.5s ease;
}

.kbanalizer-setting-hotkey.is-customized {
Expand Down