Updates for check-spelling v0.0.25 (#40386)
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled

## Summary of the Pull Request

- #39572 updated check-spelling but ignored:
   > 🐣 Breaking Changes
[Code Scanning action requires a Code Scanning
Ruleset](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset)
If you use SARIF reporting, then instead of the workflow yielding an 
when it fails, it will rely on [github-advanced-security
🤖](https://github.com/apps/github-advanced-security) to report the
failure. You will need to adjust your checks for PRs.

This means that check-spelling hasn't been properly doing its job 😦.

I'm sorry, I should have pushed a thing to this repo earlier,...

Anyway, as with most refreshes, this comes with a number of fixes, some
are fixes for typos that snuck in before the 0.0.25 upgrade, some are
for things that snuck in after, some are based on new rules in
spell-check-this, and some are hand written patterns based on running
through this repository a few times.

About the 🐣 **breaking change**: someone needs to create a ruleset for
this repository (see [Code Scanning action requires a Code Scanning
Ruleset: Sample ruleset

](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset#sample-ruleset)).

The alternative to adding a ruleset is to change the condition to not
use sarif for this repository. In general, I think the github
integration from sarif is prettier/more helpful, so I think that it's
the better choice.

You can see an example of it working in:
- https://github.com/check-spelling-sandbox/PowerToys/pull/23

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
This commit is contained in:
Josh Soref 2025-07-08 18:16:52 -04:00 committed by GitHub
parent f34735edeb
commit bf16e10baf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
199 changed files with 950 additions and 697 deletions

View File

@ -1,6 +1,9 @@
# D2D # D2D
#D?2D #D?2D
# Repeated letters
\b([a-z])\g{-1}{2,}\b
# marker to ignore all code on line # marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$ ^.*/\* #no-spell-check-line \*/.*$
# marker to ignore all code on line # marker to ignore all code on line
@ -10,6 +13,9 @@
# cspell inline # cspell inline
^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b ^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b
# copyright
Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
# patch hunk comments # patch hunk comments
^@@ -\d+(?:,\d+|) \+\d+(?:,\d+|) @@ .* ^@@ -\d+(?:,\d+|) \+\d+(?:,\d+|) @@ .*
# git index header # git index header
@ -18,6 +24,9 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
# file permissions # file permissions
['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s] ['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s]
# css fonts
\bfont(?:-family|):[^;}]+
# css url wrappings # css url wrappings
\burl\([^)]+\) \burl\([^)]+\)
@ -29,7 +38,7 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
# data url in quotes # data url in quotes
([`'"])data:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1} ([`'"])data:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
# data url # data url
\bdata:[-a-zA-Z=;:/0-9+]*,\S* \bdata:[-a-zA-Z=;:/0-9+_]*,\S*
# https/http/file urls # https/http/file urls
#(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|] #(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]
@ -68,6 +77,8 @@ magnet:[?=:\w]+
# Amazon # Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|) \bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
# AWS ARN
arn:aws:[-/:\w]+
# AWS S3 # AWS S3
\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]* \b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]*
# AWS execute-api # AWS execute-api
@ -94,6 +105,8 @@ vpc-\w+
\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]* \bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
# Google APIs # Google APIs
\bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+ \bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+
# Google Artifact Registry
\.pkg\.dev(?:/[-\w]+)+(?::[-\w]+|)
# Google Storage # Google Storage
\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|) \b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|)
# Google Calendar # Google Calendar
@ -129,6 +142,8 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+.
\bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+ \bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+
# Google Colab Research Drive # Google Colab Research Drive
\bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]* \bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]*
# Google Cloud regions
(?:us|(?:north|south)america|europe|asia|australia|me|africa)-(?:north|south|east|west|central){1,2}\d+
# GitHub SHAs (api) # GitHub SHAs (api)
\bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b \bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b
@ -167,6 +182,12 @@ GHSA(?:-[0-9a-z]{4}){3}
# GitLab commits # GitLab commits
\bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b \bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b
# #includes
^\s*#include\s*(?:<.*?>|".*?")
# #pragma lib
^\s*#pragma comment\(lib, ".*?"\)
# binance # binance
accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]* accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
@ -219,7 +240,7 @@ accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
\bmedium\.com/@?[^/\s"]+/[-\w]+ \bmedium\.com/@?[^/\s"]+/[-\w]+
# microsoft # microsoft
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]* \b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
# powerbi # powerbi
\bapp\.powerbi\.com/reportEmbed/[^"' ]* \bapp\.powerbi\.com/reportEmbed/[^"' ]*
# vs devops # vs devops
@ -393,7 +414,7 @@ ipfs://[0-9a-zA-Z]{3,}
\bgetopts\s+(?:"[^"]+"|'[^']+') \bgetopts\s+(?:"[^"]+"|'[^']+')
# ANSI color codes # ANSI color codes
(?:\\(?:u00|x)1[Bb]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+|)m (?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+)*m
# URL escaped characters # URL escaped characters
%[0-9A-F][A-F](?=[A-Za-z]) %[0-9A-F][A-F](?=[A-Za-z])
@ -429,10 +450,14 @@ sha\d+:[0-9a-f]*?[a-f]{3,}[0-9a-f]*
# pki (base64) # pki (base64)
LS0tLS1CRUdJT.* LS0tLS1CRUdJT.*
# C# includes
^\s*using [^;]+;
# uuid: # uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b \b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hex digits including css/html color classes: # hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b (?:[\\0][xX]|\\u\{?|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# integrity # integrity
integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1} integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
@ -450,7 +475,10 @@ integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
Name\[[^\]]+\]=.* Name\[[^\]]+\]=.*
# IServiceProvider / isAThing # IServiceProvider / isAThing
(?:\b|_)(?:(?:ns|)I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b)) (?:(?:\b|_|(?<=[a-z]))I|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
# python
#\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
# crypt # crypt
(['"])\$2[ayb]\$.{56}\g{-1} (['"])\$2[ayb]\$.{56}\g{-1}
@ -464,17 +492,14 @@ Name\[[^\]]+\]=.*
# machine learning (?) # machine learning (?)
#\b(?i)ml(?=[a-z]{2,}) #\b(?i)ml(?=[a-z]{2,})
# python
#\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
# scrypt / argon # scrypt / argon
\$(?:scrypt|argon\d+[di]*)\$\S+ \$(?:scrypt|argon\d+[di]*)\$\S+
# go.sum # go.sum
\bh1:\S+ \bh1:\S+
# scala imports # imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+ ^import\s+(?:(?:static|type)\s+|)(?:[\w.]|\{\s*\w*?(?:,\s*(?:\w*|\*))+\s*\})+
# scala modules # scala modules
#("[^"]+"\s*%%?\s*){2,3}"[^"]+" #("[^"]+"\s*%%?\s*){2,3}"[^"]+"
@ -483,13 +508,13 @@ Name\[[^\]]+\]=.*
image: [-\w./:@]+ image: [-\w./:@]+
# Docker images # Docker images
^\s*FROM\s+\S+:\S+(?:\s+AS\s+\S+|) ^\s*(?i)FROM\s+\S+:\S+(?:\s+AS\s+\S+|)
# `docker images` REPOSITORY TAG IMAGE ID CREATED SIZE # `docker images` REPOSITORY TAG IMAGE ID CREATED SIZE
\s*\S+/\S+\s+\S+\s+[0-9a-f]{8,}\s+\d+\s+(?:hour|day|week)s ago\s+[\d.]+[KMGT]B \s*\S+/\S+\s+\S+\s+[0-9a-f]{8,}\s+\d+\s+(?:hour|day|week)s ago\s+[\d.]+[KMGT]B
# Intel intrinsics # Intel intrinsics
_mm_(?!dd)\w+ _mm\d*_(?!dd)\w+
# Input to GitHub JSON # Input to GitHub JSON
content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1} content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
@ -523,7 +548,7 @@ content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
# javascript replace regex # javascript replace regex
\.replace\(/[^/\s"]{3,}/[gim]*\s*, \.replace\(/[^/\s"]{3,}/[gim]*\s*,
# assign regex # assign regex
= /[^*].*?(?:[a-z]{3,}|[A-Z]{3,}|[A-Z][a-z]{2,}).*/[gi]?(?=\W|$) = /[^*].*?(?:[a-z]{3,}|[A-Z]{3,}|[A-Z][a-z]{2,}).*/[gim]*(?=\W|$)
# perl regex test # perl regex test
[!=]~ (?:/.*/|m\{.*?\}|m<.*?>|m([|!/@#,;']).*?\g{-1}) [!=]~ (?:/.*/|m\{.*?\}|m<.*?>|m([|!/@#,;']).*?\g{-1})
@ -537,7 +562,7 @@ perl(?:\s+-[a-zA-Z]\w*)+
#(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\() #(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()
# Go regular expressions # Go regular expressions
regexp?\.MustCompile\(`[^`]*`\) regexp?\.MustCompile\((?:`[^`]*`|".*"|'.*')\)
# regex choice # regex choice
\(\?:[^)]+\|[^)]+\) \(\?:[^)]+\|[^)]+\)
@ -585,7 +610,7 @@ urn:shemas-jetbrains-com
# xcode # xcode
# xcodeproject scenes # xcodeproject scenes
(?:Controller|destination|ID|id)="\w{3}-\w{2}-\w{3}" (?:Controller|destination|(?:first|second)Item|ID|id)="\w{3}-\w{2}-\w{3}"
# xcode api botches # xcode api botches
customObjectInstantitationMethod customObjectInstantitationMethod
@ -600,27 +625,33 @@ PrependWithABINamepsace
\.fa-[-a-z0-9]+ \.fa-[-a-z0-9]+
# bearer auth # bearer auth
(['"])[Bb]ear[e][r] .*?\g{-1} (['"])[Bb]ear[e][r] .{3,}?\g{-1}
# bearer auth # bearer auth
\b[Bb]ear[e][r]:? [-a-zA-Z=;:/0-9+.]+ \b[Bb]ear[e][r]:? [-a-zA-Z=;:/0-9+.]{3,}
# basic auth # basic auth
(['"])[Bb]asic [-a-zA-Z=;:/0-9+]{3,}\g{-1} (['"])[Bb]asic [-a-zA-Z=;:/0-9+]{3,}\g{-1}
# basic auth
: [Bb]asic [-a-zA-Z=;:/0-9+.]{3,}
# base64 encoded content # base64 encoded content
#([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1} #([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1}
# base64 encoded content in xml/sgml # base64 encoded content in xml/sgml
>[-a-zA-Z=;:/0-9+]{3,}=</ >[-a-zA-Z=;:/0-9+]{3,}=</
# base64 encoded content, possibly wrapped in mime # base64 encoded content, possibly wrapped in mime
(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$) #(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$)
# base64 encoded json # base64 encoded json
\beyJ[-a-zA-Z=;:/0-9+]+ \beyJ[-a-zA-Z=;:/0-9+]+
# base64 encoded pkcs # base64 encoded pkcs
\bMII[-a-zA-Z=;:/0-9+]+ #\bMII[-a-zA-Z=;:/0-9+]+
# uuencoded
#[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}
# DNS rr data # DNS rr data
(?:\d+\s+){3}(?:[-+/=.\w]{2,}\s*){1,2} #(?:\d+\s+){3}(?:[-+/=.\w]{2,}\s*){1,2}
# encoded-word # encoded-word
=\?[-a-zA-Z0-9"*%]+\?[BQ]\?[^?]{0,75}\?= =\?[-a-zA-Z0-9"*%]+\?[BQ]\?[^?]{0,75}\?=
@ -629,7 +660,7 @@ PrependWithABINamepsace
\bnumer\b(?=.*denom) \bnumer\b(?=.*denom)
# Time Zones # Time Zones
\b(?:Africa|Atlantic|America|Antarctica|Asia|Australia|Europe|Indian|Pacific)(?:/\w+)+ \b(?:Africa|Atlantic|America|Antarctica|Arctic|Asia|Australia|Europe|Indian|Pacific)(?:/[-\w]+)+
# linux kernel info # linux kernel info
^(?:bugs|flags|Features)\s+:.* ^(?:bugs|flags|Features)\s+:.*
@ -669,13 +700,13 @@ systemd.*?running in system mode \([-+].*\)$
TeX/AMS TeX/AMS
# File extensions # File extensions
\*\.[+\w]+, #\*\.[+\w]+,
# eslint # eslint
"varsIgnorePattern": ".+" "varsIgnorePattern": ".+"
# nolint # nolint
nolint:\w+ nolint:\s*[\w,]+
# Windows short paths # Windows short paths
[/\\][^/\\]{5,6}~\d{1,2}(?=[/\\]) [/\\][^/\\]{5,6}~\d{1,2}(?=[/\\])
@ -683,6 +714,9 @@ nolint:\w+
# Windows Resources with accelerators # Windows Resources with accelerators
\b[A-Z]&[a-z]+\b(?!;) \b[A-Z]&[a-z]+\b(?!;)
# signed off by
(?i)Signed-off-by: .*
# cygwin paths # cygwin paths
/cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+ /cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+
@ -715,29 +749,31 @@ W/"[^"]+"
# Compiler flags (Unix, Java/Scala) # Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker` # Use if you have things like `-Pdocker` and want to treat them as `docker`
#(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) #(?:^|[\t ,>"'`=(#])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# Compiler flags (Windows / PowerShell) # Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern. # This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath` # It avoids matching `-Path` to prevent it from being treated as `ath`
#(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})) #(?:^|[\t ,"'`=(#])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))
# Compiler flags (linker) # Compiler flags (linker)
,-B ,-B
# libraries # Library prefix
(?:\b|_)lib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z]) # e.g., `lib`+`archive`, `lib`+`raw`, `lib`+`unwind`
# (ignores some words that happen to start with `lib`)
# WWNN/WWPN (NAA identifiers) (?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
\b(?:0x)?10[0-9a-f]{14}\b|\b(?:0x|3)?[25][0-9a-f]{15}\b|\b(?:0x|3)?6[0-9a-f]{31}\b
# iSCSI iqn (approximate regex) # iSCSI iqn (approximate regex)
\biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b \biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b
# WWNN/WWPN (NAA identifiers)
\b(?:0x)?10[0-9a-f]{14}\b|\b(?:0x|3)?[25][0-9a-f]{15}\b|\b(?:0x|3)?6[0-9a-f]{31}\b
# curl arguments # curl arguments
\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)* \b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# set arguments # set arguments
\b(?:bash|sh|set)(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)* \b(?:bash|sh|set)(?:\s+[-+][abefimouxE]{1,2})*\s+[-+][abefimouxE]{3,}(?:\s+[-+][abefimouxE]+)*
# tar arguments # tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+ \b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long... # tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...

View File

@ -73,7 +73,9 @@
\.qm$ \.qm$
\.s$ \.s$
\.sig$ \.sig$
\.snk$
\.so$ \.so$
\.stl$
\.svgz?$ \.svgz?$
\.sys$ \.sys$
\.tar$ \.tar$
@ -90,40 +92,40 @@
\.xz$ \.xz$
\.zip$ \.zip$
^\.github/actions/spell-check/ ^\.github/actions/spell-check/
^\.github/workflows/spelling\d*\.yml$
^\.gitmodules$ ^\.gitmodules$
^\Q.github/workflows/spelling2.yml\E$
^\Q.pipelines/272MSSharedLibSN2048.snk\E$
^\Q.pipelines/ESRPSigning_core.json\E$ ^\Q.pipelines/ESRPSigning_core.json\E$
^\Qdoc/devdocs/localization.md\E$ ^\Qdoc/devdocs/localization.md\E$
^\Qsrc/common/ManagedCommon/ColorFormatHelper.cs\E$
^\Qsrc/common/notifications/BackgroundActivatorDLL/cpp.hint\E$
^\Qsrc/modules/cmdpal/doc/initial-sdk-spec/list-elements-mock-002.pdn\E$
^\Qsrc/modules/colorPicker/ColorPickerUI/Assets/ColorPicker/colorPicker.cur\E$
^\Qsrc/modules/colorPicker/ColorPickerUI/Shaders/GridShader.cso\E$
^\Qsrc/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs\E$ ^\Qsrc/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs\E$
^\Qsrc/modules/MouseUtils/MouseJumpUI/MainForm.resx\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmAbout.cs\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmInputCallback.resx\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmLogon.resx\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmMatrix.resx\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmMessage.resx\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmMouseCursor.resx\E$
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmScreen.resx\E$
^\Qsrc/modules/MouseWithoutBorders/ModuleInterface/generateSecurityDescriptor.h\E$
^\Qsrc/modules/peek/Peek.Common/NativeMethods.txt\E$
^\Qsrc/modules/previewpane/SvgPreviewHandler/SvgHTMLPreviewGenerator.cs\E$
^\Qsrc/modules/previewpane/UnitTests-StlThumbnailProvider/HelperFiles/sample.stl\E$
^\Qtools/project_template/ModuleTemplate/resource.h\E$
^doc/devdocs/akaLinks\.md$ ^doc/devdocs/akaLinks\.md$
^NOTICE\.md$
^src/common/CalculatorEngineCommon/exprtk\.hpp$
^src/common/ManagedCommon/ColorFormatHelper\.cs$
^src/common/notifications/BackgroundActivatorDLL/cpp\.hint$
^src/common/sysinternals/Eula/
^src/modules/cmdpal/doc/initial-sdk-spec/list-elements-mock-002\.pdn$
^src/modules/colorPicker/ColorPickerUI/Shaders/GridShader\.cso$
^src/modules/launcher/Plugins/Microsoft\.PowerToys\.Run\.Plugin\.TimeDate/Properties/ ^src/modules/launcher/Plugins/Microsoft\.PowerToys\.Run\.Plugin\.TimeDate/Properties/
^src/modules/MouseUtils/MouseJumpUI/MainForm\.resx$
^src/modules/MouseWithoutBorders/App/.*/NativeMethods\.cs$ ^src/modules/MouseWithoutBorders/App/.*/NativeMethods\.cs$
^src/modules/MouseWithoutBorders/App/Form/.*\.Designer\.cs$ ^src/modules/MouseWithoutBorders/App/Form/.*\.Designer\.cs$
^src/modules/MouseWithoutBorders/App/Form/.*\.resx$ ^src/modules/MouseWithoutBorders/App/Form/.*\.resx$
^src/modules/MouseWithoutBorders/App/Form/frmAbout\.cs$
^src/modules/MouseWithoutBorders/App/Form/frmInputCallback\.resx$
^src/modules/MouseWithoutBorders/App/Form/frmLogon\.resx$
^src/modules/MouseWithoutBorders/App/Form/frmMatrix\.resx$
^src/modules/MouseWithoutBorders/App/Form/frmMessage\.resx$
^src/modules/MouseWithoutBorders/App/Form/frmMouseCursor\.resx$
^src/modules/MouseWithoutBorders/App/Form/frmScreen\.resx$
^src/modules/MouseWithoutBorders/App/Helper/.*\.resx$ ^src/modules/MouseWithoutBorders/App/Helper/.*\.resx$
^src/modules/MouseWithoutBorders/ModuleInterface/generateSecurityDescriptor\.h$
^src/modules/peek/Peek.Common/NativeMethods\.txt$
^src/modules/previewpane/SvgPreviewHandler/SvgHTMLPreviewGenerator\.cs$
^src/modules/previewpane/UnitTests-MarkdownPreviewHandler/HelperFiles/MarkdownWithHTMLImageTag\.txt$ ^src/modules/previewpane/UnitTests-MarkdownPreviewHandler/HelperFiles/MarkdownWithHTMLImageTag\.txt$
^src/modules/registrypreview/RegistryPreviewUILib/Controls/HexBox/.*$
^src/modules/ZoomIt/ZoomIt/ZoomIt\.idc$ ^src/modules/ZoomIt/ZoomIt/ZoomIt\.idc$
^src/Monaco/ ^src/Monaco/
^src/common/sysinternals/Eula/ ^tools/project_template/ModuleTemplate/resource\.h$
^tools/Verification scripts/Check preview handler registration\.ps1$ ^tools/Verification scripts/Check preview handler registration\.ps1$
ignore$ ignore$
^src/modules/registrypreview/RegistryPreviewUILib/Controls/HexBox/.*$ ^src/modules/registrypreview/RegistryPreviewUILib/Controls/HexBox/.*$

View File

@ -1,4 +1,4 @@
aaaa AAAAs
abcdefghjkmnpqrstuvxyz abcdefghjkmnpqrstuvxyz
abgr abgr
ABlocked ABlocked
@ -9,23 +9,24 @@ ACCEPTFILES
ACCESSDENIED ACCESSDENIED
ACCESSTOKEN ACCESSTOKEN
acfs acfs
ACIE
AClient AClient
AColumn AColumn
acrt acrt
ACTIVATEAPP ACTIVATEAPP
activationaction
ACTIVATEOPTIONS ACTIVATEOPTIONS
ACVS activationaction
adaptivecards adaptivecards
ADate ADate
ADDSTRING ADDSTRING
ADDUNDORECORD ADDUNDORECORD
ADifferent ADifferent
ADMINS
adml adml
admx admx
advancedpaste
advfirewall advfirewall
AFeature AFeature
AFFINETRANSFORM
affordances affordances
AFX AFX
AGGREGATABLE AGGREGATABLE
@ -43,12 +44,11 @@ ALPHATYPE
AModifier AModifier
amr amr
ANDSCANS ANDSCANS
animatedvisuals
Animnate Animnate
ansicolor
ANull ANull
AOC AOC
aocfnapldcnfbofgmbbllojgocaelgdd aocfnapldcnfbofgmbbllojgocaelgdd
AOklab
APARTMENTTHREADED APARTMENTTHREADED
APeriod APeriod
apicontract apicontract
@ -66,10 +66,10 @@ appref
appsettings appsettings
appwindow appwindow
appwiz appwiz
appxpackage
APSTUDIO APSTUDIO
AQS AQS
ARandom ARandom
Arash
ARCHITEW ARCHITEW
ARemapped ARemapped
ARPINSTALLLOCATION ARPINSTALLLOCATION
@ -77,6 +77,7 @@ ARPPRODUCTICON
ARRAYSIZE ARRAYSIZE
ARROWKEYS ARROWKEYS
asf asf
Ashcraft
AShortcut AShortcut
ASingle ASingle
ASSOCCHANGED ASSOCCHANGED
@ -85,7 +86,6 @@ ASSOCSTR
ASYNCWINDOWPLACEMENT ASYNCWINDOWPLACEMENT
ASYNCWINDOWPOS ASYNCWINDOWPOS
atl atl
atleast
ATRIOX ATRIOX
aumid aumid
Authenticode Authenticode
@ -99,12 +99,11 @@ Autorun
AUTOTICKS AUTOTICKS
AUTOUPDATE AUTOUPDATE
AValid AValid
awakeness
AWAYMODE AWAYMODE
azcliversion azcliversion
azman azman
backtracer
bbwe bbwe
BCIE
bck bck
BESTEFFORT BESTEFFORT
bezelled bezelled
@ -130,12 +129,10 @@ Blt
BLURBEHIND BLURBEHIND
BLURREGION BLURREGION
bmi bmi
bms
BNDBk
BNumber BNumber
BODGY BODGY
BOklab
BOOTSTRAPPERINSTALLFOLDER BOOTSTRAPPERINSTALLFOLDER
bostrot
BOTTOMALIGN BOTTOMALIGN
boxmodel boxmodel
BPBF BPBF
@ -164,7 +161,6 @@ callbackptr
calpwstr calpwstr
Cangjie Cangjie
CANRENAME CANRENAME
Cantarell
CAPTUREBLT CAPTUREBLT
CAPTURECHANGED CAPTURECHANGED
CARETBLINKING CARETBLINKING
@ -175,6 +171,7 @@ CCHFORMNAME
CCom CCom
CContext CContext
CDeclaration CDeclaration
CDPX
CElems CElems
CENTERALIGN CENTERALIGN
cer cer
@ -187,6 +184,7 @@ CHILDACTIVATE
CHILDWINDOW CHILDWINDOW
CHOOSEFONT CHOOSEFONT
cidl cidl
CIELCh
cim cim
CImage CImage
cla cla
@ -216,6 +214,7 @@ CMONITORS
cmph cmph
CNF CNF
coclass coclass
CODENAME
codereview codereview
Codespaces Codespaces
COINIT COINIT
@ -229,6 +228,7 @@ comctl
comdlg comdlg
comexp comexp
cominterop cominterop
commandnotfound
commandpalette commandpalette
compmgmt compmgmt
COMPOSITIONFULL COMPOSITIONFULL
@ -236,15 +236,18 @@ CONFIGW
CONFLICTINGMODIFIERKEY CONFLICTINGMODIFIERKEY
CONFLICTINGMODIFIERSHORTCUT CONFLICTINGMODIFIERSHORTCUT
CONOUT CONOUT
constexpr
contentdialog
contentfiles contentfiles
CONTEXTHELP CONTEXTHELP
CONTEXTMENUHANDLER CONTEXTMENUHANDLER
contractversion contractversion
CONTROLL
CONTROLPARENT CONTROLPARENT
copiedcolorrepresentation copiedcolorrepresentation
copyable
COPYPEN COPYPEN
COREWINDOW COREWINDOW
Corpor
cotaskmem cotaskmem
COULDNOT COULDNOT
countof countof
@ -261,6 +264,7 @@ CREATEWINDOWFAILED
CRECT CRECT
CRH CRH
critsec critsec
cropandlock
Crossdevice Crossdevice
CSearch CSearch
CSettings CSettings
@ -270,9 +274,7 @@ CStyle
cswin cswin
CTest CTest
CTEXT CTEXT
Ctl
CTLCOLORSTATIC CTLCOLORSTATIC
currentculture
CURRENTDIR CURRENTDIR
CURSORINFO CURSORINFO
cursorpos cursorpos
@ -284,17 +286,17 @@ CVal
cvd cvd
CVirtual CVirtual
CVS CVS
cxfksword
CXSCREEN CXSCREEN
CXSMICON CXSMICON
CXVIRTUALSCREEN CXVIRTUALSCREEN
cyberrex
CYSCREEN CYSCREEN
CYSMICON CYSMICON
CYVIRTUALSCREEN CYVIRTUALSCREEN
cziplib cziplib
Dac Dac
dacl dacl
DAffine
DAFFINETRANSFORM
datareader datareader
datatracker datatracker
dataversion dataversion
@ -305,18 +307,13 @@ DBLEPSILON
DBPROP DBPROP
DBPROPIDSET DBPROPIDSET
DBPROPSET DBPROPSET
DCapture
DCBA DCBA
DCOM DCOM
DComposition DComposition
DCR DCR
ddd
DDEIf DDEIf
DDevice
DDxgi
Deact Deact
debugbreak debugbreak
declatory
decryptor decryptor
Dedup Dedup
Deeplink Deeplink
@ -332,10 +329,8 @@ DEFAULTTOPRIMARY
DEFERERASE DEFERERASE
DEFPUSHBUTTON DEFPUSHBUTTON
deinitialization deinitialization
DELA
DELETEDKEYIMAGE DELETEDKEYIMAGE
DELETESCANS DELETESCANS
deletethis
DEMOTYPE DEMOTYPE
DENORMAL DENORMAL
depersist depersist
@ -356,7 +351,6 @@ devpal
DFX DFX
DIALOGEX DIALOGEX
digicert digicert
dimm
DINORMAL DINORMAL
DISABLEASACTIONKEY DISABLEASACTIONKEY
DISABLENOSCROLL DISABLENOSCROLL
@ -380,7 +374,6 @@ DONTVALIDATEPATH
dotnet dotnet
DPICHANGED DPICHANGED
DPIs DPIs
DPolicy
DPSAPI DPSAPI
DQTAT DQTAT
DQTYPE DQTYPE
@ -389,13 +382,12 @@ DRAWFRAME
drawingcolor drawingcolor
dreamsofameaningfullife dreamsofameaningfullife
drivedetectionwarning drivedetectionwarning
Droid
DROPFILES DROPFILES
DSTINVERT DSTINVERT
DSurface DString
DTexture DSVG
DTo
DUMMYUNIONNAME DUMMYUNIONNAME
Dutil
DVASPECT DVASPECT
DVASPECTINFO DVASPECTINFO
DVD DVD
@ -438,6 +430,7 @@ ENDSESSION
ENSUREVISIBLE ENSUREVISIBLE
ENTERSIZEMOVE ENTERSIZEMOVE
ENU ENU
environmentvariables
EOAC EOAC
EPO EPO
epu epu
@ -446,7 +439,6 @@ EREOF
EResize EResize
ERRORIMAGE ERRORIMAGE
ERRORTITLE ERRORTITLE
erwrite
ESettings ESettings
esrp esrp
ETDT ETDT
@ -454,7 +446,6 @@ etl
etw etw
eula eula
eurochange eurochange
eventlog
eventvwr eventvwr
evt evt
EWXFORCE EWXFORCE
@ -489,11 +480,13 @@ eyetracker
FANCYZONESDRAWLAYOUTTEST FANCYZONESDRAWLAYOUTTEST
FANCYZONESEDITOR FANCYZONESEDITOR
FARPROC FARPROC
fff
FFFF FFFF
FILEEXPLORER FILEEXPLORER
fileexploreraddons
fileexplorerpreview
FILEFLAGS FILEFLAGS
FILEFLAGSMASK FILEFLAGSMASK
filelocksmith
FILELOCKSMITHCONTEXTMENU FILELOCKSMITHCONTEXTMENU
FILELOCKSMITHEXT FILELOCKSMITHEXT
FILELOCKSMITHLIBINTEROP FILELOCKSMITHLIBINTEROP
@ -506,10 +499,9 @@ FILESUBTYPE
FILESYSPATH FILESYSPATH
Filetime Filetime
FILEVERSION FILEVERSION
Filterkeyboard
FILTERMODE FILTERMODE
findfast findfast
Fira findmymouse
FIXEDFILEINFO FIXEDFILEINFO
FIXEDSYS FIXEDSYS
flac flac
@ -526,13 +518,12 @@ FORCEMINIMIZE
FORMATDLGORD FORMATDLGORD
formatetc formatetc
FORPARSING FORPARSING
Fqc
FRAMECHANGED FRAMECHANGED
frm frm
Froml
FROMTOUCH FROMTOUCH
fsanitize fsanitize
fsmgmt fsmgmt
fuzzingtesting
FZE FZE
gacutil gacutil
Gaeilge Gaeilge
@ -544,7 +535,6 @@ gdi
gdiplus gdiplus
GDIPVER GDIPVER
GDISCALED GDISCALED
GEmoji
GETCLIENTAREAANIMATION GETCLIENTAREAANIMATION
GETCURSEL GETCURSEL
GETDESKWALLPAPER GETDESKWALLPAPER
@ -569,7 +559,6 @@ GPOCA
gpp gpp
gpu gpu
gradians gradians
gsl
GSM GSM
gtm gtm
guiddata guiddata
@ -617,7 +606,6 @@ hicon
HIDEREADONLY HIDEREADONLY
HIDEWINDOW HIDEWINDOW
Hif Hif
hightlight
HIMAGELIST HIMAGELIST
himl himl
hinst hinst
@ -641,12 +629,14 @@ homljgmgpmcbpjbnjpfijnhipfkiclkd
HORZRES HORZRES
HORZSIZE HORZSIZE
Hostbackdropbrush Hostbackdropbrush
hostsfileeditor
Hostx
hotfixes
hotkeycontrol hotkeycontrol
HOTKEYF HOTKEYF
hotkeys hotkeys
hotlight hotlight
hotspot hotspot
Hostx
HPAINTBUFFER HPAINTBUFFER
HRAWINPUT HRAWINPUT
HREDRAW HREDRAW
@ -675,7 +665,6 @@ HWNDPARENT
HWNDPREV HWNDPREV
hyjiacan hyjiacan
IAI IAI
IBeam
icf icf
ICONERROR ICONERROR
ICONLOCATION ICONLOCATION
@ -685,13 +674,13 @@ idk
idl idl
idlist idlist
IDOK IDOK
IDOn
IDR IDR
IDXGI IDXGI
ietf ietf
IEXPLORE IEXPLORE
IFACEMETHOD IFACEMETHOD
IFACEMETHODIMP IFACEMETHODIMP
IFile
IGNOREUNKNOWN IGNOREUNKNOWN
IGo IGo
iid iid
@ -717,7 +706,7 @@ INITDIALOG
INITGUID INITGUID
INITTOLOGFONTSTRUCT INITTOLOGFONTSTRUCT
INLINEPREFIX INLINEPREFIX
inorder Inlines
INPC INPC
inproc inproc
INPUTHARDWARE INPUTHARDWARE
@ -742,27 +731,26 @@ Interlop
INTRESOURCE INTRESOURCE
INVALIDARG INVALIDARG
invalidoperatioexception invalidoperatioexception
invokecommand
ipcmanager ipcmanager
IPREVIEW IPREVIEW
ipreviewhandlervisualssetfont
irow
irprops irprops
isbi isbi
ISearch isfinite
ISettings
isocpp
iss iss
issecret issecret
ISSEPARATOR ISSEPARATOR
issuecomment
istep istep
ith ith
ITHUMBNAIL ITHUMBNAIL
IUI IUI
IUnknown
IUse
IWIC IWIC
jfif jfif
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
jjw jjw
JLO
jobject jobject
jpe jpe
jpnime jpnime
@ -783,16 +771,19 @@ KEYEVENTF
KEYIMAGE KEYIMAGE
keynum keynum
keyremaps keyremaps
keyring
keyvault keyvault
KILLFOCUS KILLFOCUS
killrunner killrunner
kmph kmph
Kybd Kybd
lastcodeanalysissucceeded lastcodeanalysissucceeded
Lastdevice
LASTEXITCODE LASTEXITCODE
LAYOUTRTL LAYOUTRTL
LCh
lcid
LCIDTo LCIDTo
lcl
Lclean Lclean
Ldone Ldone
Ldr Ldr
@ -803,6 +794,7 @@ LError
LEVELID LEVELID
LExit LExit
lhwnd lhwnd
LIBFUZZER
LIBID LIBID
LIMITSIZE LIMITSIZE
LIMITTEXT LIMITTEXT
@ -816,10 +808,8 @@ LLKH
llkhf llkhf
LMEM LMEM
LMENU LMENU
lnks
LOADFROMFILE LOADFROMFILE
LOBYTE LOBYTE
LOCALDISPLAY
localpackage localpackage
LOCALSYSTEM LOCALSYSTEM
LOCATIONCHANGE LOCATIONCHANGE
@ -829,6 +819,7 @@ LOGFONTW
logon logon
LOGPIXELSX LOGPIXELSX
LOGPIXELSY LOGPIXELSY
LOn
longdate longdate
LONGNAMES LONGNAMES
lowlevel lowlevel
@ -873,11 +864,9 @@ lstrcmpi
lstrcpyn lstrcpyn
lstrlen lstrlen
LTEXT LTEXT
LTk
LTRREADING LTRREADING
luid luid
LUMA LUMA
LUQ
lusrmgr lusrmgr
LVal LVal
lvm lvm
@ -891,6 +880,7 @@ MAKEINTRESOURCEW
MAKELANGID MAKELANGID
MAKELONG MAKELONG
MAKELPARAM MAKELPARAM
makepri
MAKEWPARAM MAKEWPARAM
manifestdependency manifestdependency
MAPPEDTOSAMEKEY MAPPEDTOSAMEKEY
@ -922,12 +912,13 @@ Microwaved
middleclickaction middleclickaction
midl midl
mii mii
MIIM
mikeclayton
mindaro mindaro
Minimizable Minimizable
MINIMIZEBOX MINIMIZEBOX
MINIMIZEEND MINIMIZEEND
MINIMIZESTART MINIMIZESTART
miniz
MINMAXINFO MINMAXINFO
minwindef minwindef
Mip Mip
@ -951,13 +942,14 @@ monitorinfof
MOUSEACTIVATE MOUSEACTIVATE
MOUSEDATA MOUSEDATA
MOUSEEVENTF MOUSEEVENTF
mousehighlighter
MOUSEHWHEEL MOUSEHWHEEL
MOUSEINPUT MOUSEINPUT
mousejump
mousepointer
mouseutils
MOVESIZEEND MOVESIZEEND
MOVESIZESTART MOVESIZESTART
MOZILLAPL
MOZPL
mpmc
MRM MRM
MRT MRT
mru mru
@ -980,15 +972,14 @@ msixbundle
MSIXCA MSIXCA
MSLLHOOKSTRUCT MSLLHOOKSTRUCT
Mso Mso
msp
msrc msrc
msstore msstore
mst
msvcp msvcp
MTND MTND
MULTIPLEUSE MULTIPLEUSE
multizone multizone
muxc muxc
MVPs
mvvm mvvm
MVVMTK MVVMTK
MWBEx MWBEx
@ -1010,7 +1001,6 @@ NCMBUTTONDOWN
NCMBUTTONUP NCMBUTTONUP
NCMOUSELEAVE NCMOUSELEAVE
NCMOUSEMOVE NCMOUSEMOVE
nconsectetur
ncpa ncpa
NCPAINT NCPAINT
NCRENDERING NCRENDERING
@ -1031,8 +1021,6 @@ newplus
NEWPLUSCONTEXTMENU NEWPLUSCONTEXTMENU
NEWPLUSSHELLEXTENSIONWIN NEWPLUSSHELLEXTENSIONWIN
newrow newrow
newsgroups
NGQt
nicksnettravels nicksnettravels
NIF NIF
NLog NLog
@ -1052,6 +1040,7 @@ NOCOPYBITS
NOCOPYSECURITYATTRIBS NOCOPYSECURITYATTRIBS
NOCRLF NOCRLF
nodeca nodeca
nodiscard
NODRAWCAPTION NODRAWCAPTION
NODRAWICON NODRAWICON
NOINHERITLAYOUT NOINHERITLAYOUT
@ -1067,7 +1056,6 @@ NONANTIALIASED
nonclient nonclient
NONCLIENTMETRICSW NONCLIENTMETRICSW
NONELEVATED NONELEVATED
NONINFRINGEMENT
nonspace nonspace
nonstd nonstd
NOOWNERZORDER NOOWNERZORDER
@ -1095,18 +1083,17 @@ NOTOPMOST
NOTRACK NOTRACK
NOTSRCCOPY NOTSRCCOPY
NOTSRCERASE NOTSRCERASE
NOTXORPEN
notwindows notwindows
NOTXORPEN
NOZORDER NOZORDER
NPH NPH
npmjs npmjs
NResize NResize
nsunt
NTAPI NTAPI
ntdll ntdll
ntfs
NTSTATUS NTSTATUS
NTSYSAPI NTSYSAPI
NTZm
NULLCURSOR NULLCURSOR
nullonfailure nullonfailure
numberbox numberbox
@ -1124,6 +1111,7 @@ oldpath
oldtheme oldtheme
oleaut oleaut
OLECHAR OLECHAR
onebranch
openas openas
opencode opencode
OPENFILENAME OPENFILENAME
@ -1133,7 +1121,6 @@ OPTIMIZEFORINVOKE
ORPHANEDDIALOGTITLE ORPHANEDDIALOGTITLE
ORSCANS ORSCANS
oss oss
ostr
OSVERSIONINFO OSVERSIONINFO
OSVERSIONINFOEX OSVERSIONINFOEX
OSVERSIONINFOEXW OSVERSIONINFOEXW
@ -1141,14 +1128,13 @@ OSVERSIONINFOW
osvi osvi
OUTOFCONTEXT OUTOFCONTEXT
Outptr Outptr
outputtype
outsettings outsettings
OVERLAPPEDWINDOW OVERLAPPEDWINDOW
Oversampling Oversampling
OVERWRITEPROMPT OVERWRITEPROMPT
OWMt
OWNDC OWNDC
OWNERDRAWFIXED OWNERDRAWFIXED
OWRj
Packagemanager Packagemanager
PACL PACL
PAINTSTRUCT PAINTSTRUCT
@ -1162,7 +1148,6 @@ PARTIALCONFIRMATIONDIALOGTITLE
PATCOPY PATCOPY
PATHMUSTEXIST PATHMUSTEXIST
PATINVERT PATINVERT
partow
PATPAINT PATPAINT
pbc pbc
pbi pbi
@ -1175,7 +1160,7 @@ pchast
PCIDLIST PCIDLIST
PCTSTR PCTSTR
PCWSTR PCWSTR
pdbs PDBs
PDEVMODE PDEVMODE
pdisp pdisp
PDLL PDLL
@ -1208,13 +1193,13 @@ pinfo
pinvoke pinvoke
pipename pipename
PKBDLLHOOKSTRUCT PKBDLLHOOKSTRUCT
Playbadge
plib plib
ploc ploc
ploca ploca
plocm plocm
pluginsmodel pluginsmodel
PMAGTRANSFORM PMAGTRANSFORM
PMs
PMSIHANDLE PMSIHANDLE
pnid pnid
PNMLINK PNMLINK
@ -1247,6 +1232,7 @@ ppstm
ppsz ppsz
pptal pptal
ppv ppv
ppwsz
prc prc
Prefixer Prefixer
prependpath prependpath
@ -1268,6 +1254,7 @@ prm
proactively proactively
PROCESSENTRY PROCESSENTRY
PROCESSKEY PROCESSKEY
processthreadsapi
PROCESSTRACE PROCESSTRACE
procmon procmon
PRODEXT PRODEXT
@ -1286,6 +1273,7 @@ PSECURITY
psfgao psfgao
psfi psfi
PSMODULEPATH PSMODULEPATH
Psr
psrm psrm
psrree psrree
pstatstg pstatstg
@ -1303,14 +1291,12 @@ PTOKEN
PToy PToy
ptstr ptstr
pui pui
Puser
PWAs PWAs
pwcs pwcs
PWSTR PWSTR
pwsz pwsz
pwtd pwtd
QDC QDC
qianlifeng
qit qit
QITAB QITAB
QITABENT QITABENT
@ -1319,11 +1305,10 @@ Quarternary
QUERYENDSESSION QUERYENDSESSION
QUERYOPEN QUERYOPEN
QUEUESYNC QUEUESYNC
quickaccent
QUNS QUNS
QXZ
RAII RAII
RAlt RAlt
Rappl
randi randi
Rasterization Rasterization
Rasterize Rasterize
@ -1350,11 +1335,11 @@ REGCLS
regfile regfile
REGISTERCLASSFAILED REGISTERCLASSFAILED
REGISTRYHEADER REGISTRYHEADER
registrypath
REGISTRYPREVIEWEXT REGISTRYPREVIEWEXT
registryroot registryroot
regkey regkey
regroot regroot
regsvr
REINSTALLMODE REINSTALLMODE
reloadable reloadable
Relogger Relogger
@ -1379,7 +1364,6 @@ RESIZETOFIT
resmimetype resmimetype
RESOURCEID RESOURCEID
RESTORETOMAXIMIZED RESTORETOMAXIMIZED
resultlist
RETURNONLYFSDIRS RETURNONLYFSDIRS
RGBQUAD RGBQUAD
rgbs rgbs
@ -1388,10 +1372,10 @@ rgf
rgh rgh
rgn rgn
rgs rgs
rguid
RIDEV RIDEV
RIGHTSCROLLBAR RIGHTSCROLLBAR
riid riid
ringbuffer
RKey RKey
RNumber RNumber
rop rop
@ -1399,7 +1383,6 @@ ROUNDSMALL
ROWSETEXT ROWSETEXT
rpcrt rpcrt
RRF RRF
rrr
rsop rsop
Rsp Rsp
rstringalnum rstringalnum
@ -1407,6 +1390,7 @@ rstringalpha
rstringdigit rstringdigit
RTB RTB
RTLREADING RTLREADING
rtm
runas runas
rundll rundll
rungameid rungameid
@ -1425,10 +1409,9 @@ SAVEFAILED
scanled scanled
schedtasks schedtasks
SCID SCID
Scip
scipbe
Scode Scode
SCREENFONTS SCREENFONTS
screenruler
screensaver screensaver
screenshots screenshots
scrollviewer scrollviewer
@ -1474,7 +1457,7 @@ SFGAOF
SHACF SHACF
SHANDLE SHANDLE
sharepoint sharepoint
sharpkeys sharpfuzz
SHCNE SHCNE
SHCNF SHCNF
SHCONTF SHCONTF
@ -1500,7 +1483,6 @@ SHORTCUTMAXONEACTIONKEY
SHORTCUTNOREPEATEDMODIFIER SHORTCUTNOREPEATEDMODIFIER
SHORTCUTONEACTIONKEY SHORTCUTONEACTIONKEY
SHORTCUTSTARTWITHMODIFIER SHORTCUTSTARTWITHMODIFIER
Shortcuttool
shortdate shortdate
SHORTPATH SHORTPATH
shortsplit shortsplit
@ -1546,6 +1528,7 @@ snk
snwprintf snwprintf
softline softline
SOURCECLIENTAREAONLY SOURCECLIENTAREAONLY
sourced
sourcedoc sourcedoc
SOURCEHEADER SOURCEHEADER
sourcesdirectory sourcesdirectory
@ -1609,11 +1592,13 @@ strret
stscanf stscanf
sttngs sttngs
Stubless Stubless
stuttery
STYLECHANGED STYLECHANGED
STYLECHANGING STYLECHANGING
subkeys subkeys
sublang sublang
SUBMODULEUPDATE SUBMODULEUPDATE
subresource
Superbar Superbar
sut sut
svchost svchost
@ -1643,21 +1628,19 @@ SYSMENU
SYSTEMAPPS SYSTEMAPPS
SYSTEMMODAL SYSTEMMODAL
SYSTEMTIME SYSTEMTIME
TApplication TARG
TApplied
targ
TARGETAPPHEADER TARGETAPPHEADER
TARGETDIR TARGETDIR
targetentrypoint targetentrypoint
TARGETHEADER TARGETHEADER
targetver targetver
taskbar
taskkill taskkill
taskschd taskschd
TCHAR TCHAR
TCIF TCIF
TCITEM TCITEM
TCN TCN
Tcollab
tcs tcs
tcscat tcscat
tcschr tcschr
@ -1666,16 +1649,14 @@ tcscpy
tcsdup tcsdup
tcslen tcslen
tcsrchr tcsrchr
TCustom
tdbuild tdbuild
TDefault
TDevice
telephon telephon
templatenamespace templatenamespace
TESTONLY TESTONLY
testprocess testprocess
TEXCOORD TEXCOORD
TEXTBOXNEWLINE TEXTBOXNEWLINE
textextractor
TEXTINCLUDE TEXTINCLUDE
tfopen tfopen
tgz tgz
@ -1683,9 +1664,7 @@ themeresources
THH THH
THICKFRAME THICKFRAME
THISCOMPONENT THISCOMPONENT
THotkey
throughs throughs
TIcon
TILEDWINDOW TILEDWINDOW
TILLSON TILLSON
timedate timedate
@ -1696,7 +1675,6 @@ TITLEBARINFO
Titlecase Titlecase
tkcontrols tkcontrols
tkconverters tkconverters
TLayout
tlb tlb
tlbimp tlbimp
tlc tlc
@ -1714,20 +1692,14 @@ tracelogging
tracerpt tracerpt
trackbar trackbar
trafficmanager trafficmanager
traies
transicc transicc
TRAYMOUSEMESSAGE TRAYMOUSEMESSAGE
TResult
triaging triaging
trl trl
trx trx
tsa tsa
TSender
TServer
tskill tskill
tstoi tstoi
TStr
tweakme
TWF TWF
tymed tymed
TYPEKEYBOARD TYPEKEYBOARD
@ -1741,7 +1713,6 @@ UBR
UCallback UCallback
ucrt ucrt
ucrtd ucrtd
udit
uefi uefi
uesc uesc
UFlags UFlags
@ -1753,7 +1724,6 @@ ums
uncompilable uncompilable
UNCPRIORITY UNCPRIORITY
UNDNAME UNDNAME
unhiding
UNICODETEXT UNICODETEXT
uninstalls uninstalls
Uniquifies Uniquifies
@ -1767,7 +1737,6 @@ unwide
unzoom unzoom
UOffset UOffset
UOI UOI
Updatelayout
UPDATENOW UPDATENOW
UPDATEREGISTRY UPDATEREGISTRY
updown updown
@ -1789,6 +1758,7 @@ vabdq
validmodulename validmodulename
valuegenerator valuegenerator
variantassignment variantassignment
VARTYPE
vcamp vcamp
VCENTER VCENTER
vcgtq vcgtq
@ -1808,12 +1778,11 @@ VERTSIZE
VFT VFT
vget vget
vgetq vgetq
viewmodel viewmodels
VIRTKEY VIRTKEY
VIRTUALDESK VIRTUALDESK
VISEGRADRELAY VISEGRADRELAY
visiblecolorformats visiblecolorformats
Visibletrue
visualeffects visualeffects
vkey vkey
vmovl vmovl
@ -1865,13 +1834,12 @@ wekyb
wft wft
wgpocpl wgpocpl
WHEREID WHEREID
Wholegrain
wic wic
wifi wifi
wil wikipedia
WIL
winapi winapi
winappsdk winappsdk
wincolor
windir windir
WINDOWCREATED WINDOWCREATED
WINDOWEDGE WINDOWEDGE
@ -1887,6 +1855,8 @@ WINDOWSTYLES
WINDOWSTYLESICON WINDOWSTYLESICON
winerror winerror
WINEVENT WINEVENT
winexe
winforms
winget winget
wingetcreate wingetcreate
Winhook Winhook
@ -1942,7 +1912,6 @@ WRITEOBJECTS
Wrk Wrk
wrl wrl
wscui wscui
wsf
wsh wsh
wstr wstr
wsz wsz
@ -1963,6 +1932,7 @@ XElement
xfd xfd
XFile XFile
XIncrement XIncrement
XLoc
XNamespace XNamespace
Xoshiro Xoshiro
XPels XPels
@ -1976,16 +1946,15 @@ XVIRTUALSCREEN
xxxxxx xxxxxx
YAxis YAxis
ycombinator ycombinator
Yeet
YIncrement YIncrement
yinle yinle
yinyue yinyue
YPels YPels
YResolution YResolution
YStr YStr
YTM
YVIRTUALSCREEN YVIRTUALSCREEN
ZEROINIT ZEROINIT
zonability
zonable zonable
zoneset zoneset
Zoneszonabletester Zoneszonabletester
@ -1993,58 +1962,3 @@ Zoomin
zoomit zoomit
ZOOMITX ZOOMITX
Zorder Zorder
ZXk
ZXNs
zzz
ACIE
AOklab
BCIE
BOklab
culori
Evercoder
LCh
CIELCh
irow
lcid
ppwsz
rguid
VARTYPE
advancedpaste
appxpackage
Ashcraft
CDPX
commandnotfound
copyable
Corpor
cropandlock
environmentvariables
fileexploreraddons
filelocksmith
findmymouse
fucntion
fuzzingtesting
hostsfileeditor
hotfixes
IDOn
lcl
LIBFUZZER
makepri
mikeclayton
mousehighlighter
mousejump
mousepointer
mouseutils
MVPs
onebranch
PMs
Psr
quickaccent
regsvr
screenruler
sharpfuzz
sourced
stuttery
textextractor
Windowss
XLoc
zonability

View File

@ -8,6 +8,31 @@
# you might not want to check in code where you skip all the other tests. # you might not want to check in code where you skip all the other tests.
#\bfit\( #\bfit\(
# English does not use a hyphen between adverbs and nouns
# https://twitter.com/nyttypos/status/1894815686192685239
(?:^|\s)[A-Z]?[a-z]+ly-(?=[a-z]{3,})(?:[.,?!]?\s|$)
# Smart quotes should match
\s[^.?!]+[^.?!]+[^.?!]+|\s[^.?!]+[^.?!]+[^.?!]+|\s”[^.?!“”]+”[^.?!“”]+“[^.?!“”]+”|\s“[^.?!“”]+”[^.?!“”]+”[^.?!“”]+”
# Don't use `requires that` + `to be`
# https://twitter.com/nyttypos/status/1894816551435641027
\brequires that \w+\b[^.]+to be\b
# A fully parenthetical sentences period goes inside the parentheses, not outside.
# https://twitter.com/nyttypos/status/1898844061873639490
\([A-Z][a-z]{2,}(?: [a-z]+){3,}\)\.\s
# Complete sentences shouldn't be in the middle of another sentence as a parenthetical.
(?<!\.)(?<!\betc)\.\),
# Complete sentences in parentheticals should not have a space before the period.
\s\.\)(?!.*\}\})
# This probably indicates Mojibake https://en.wikipedia.org/wiki/Mojibake
# You probably should try to unbake this content
Ã(?:Â[¤¶¥]|[£¢])|Ã
# Should be `HH:MM:SS` # Should be `HH:MM:SS`
\bHH:SS:MM\b \bHH:SS:MM\b
@ -24,18 +49,74 @@
# Should be `a priori` or `and prior` # Should be `a priori` or `and prior`
(?i)(?<!posteriori)\sand priori\s (?i)(?<!posteriori)\sand priori\s
# Should be `a`
\san (?=(?:[b-df-gj-npqtv-xz]|h(?!our|tml|ttp)|r(?!c\b)|s(?!sh|vg))[a-z])
# Articles generally shouldn't be used without a noun and a verb
# - Perhaps you're missing a verb between the noun and the second article.
# - Or, perhaps you should remove the first verb and treat the intervening word as a verb?
# - In some cases you should add a `,` between the noun and the second article.
\s(?:an?|the(?! action))\s(?!way|wh|how\b)[A-Za-z][a-z]+[a-qs-z]\s(?:a(?! bit)n?|the)\s
# Should only be one of `a`, `an`, or `the` # Should only be one of `a`, `an`, or `the`
\b(?:(?:an?|the)\s+){2,}\b \b(?:(?:an?|the)\s+){2,}\b
# Should be a list `something, a second thing, or a third thing` or `something, a thing to do a thing`
# -- This rule is experimental, if you find it has a high false-positive rate, please let the maintainer know
#(?:^|[?!.] )[^()?!;,.]+, a(?:\s+(?!to\b)\w+)+?\s+an?\b
# Should only be `are` or `can`, not both
\b(?:(?:are|can)\s+){2,}\b
# Should probably be `ABCDEFGHIJKLMNOPQRSTUVWXYZ`
(?i)(?!ABCDEFGHIJKLMNOPQRSTUVWXYZ)ABC[A-Z]{21}YZ
# Should be `an`
#(?<!\b[Ii] |\.)\bam\b
# Should be `anymore` # Should be `anymore`
\bany more[,.] \bany more[,.]
# Should be `Ask`
(?:^|[.?]\s+)As\s+[A-Z][a-z]{2,}\s[^.?]*?(?:how|if|wh\w+)\b
# Should be `at one fell swoop`
# and only when talking about killing, not some other completion
# Act 4 Scene 3, Macbeth
# https://www.opensourceshakespeare.org/views/plays/play_view.php?WorkID=macbeth&Act=4&Scene=3&Scope=scene
\bin one fell s[lw]?oop\b
# Should be `'` # Should be `'`
(?i)\b(?:(?:i|s?he|they|what|who|you)"ll|(?:are|ca|did|do|does|ha[ds]|have|is|should|were|wo|would)n"t|(?:s?he|let|that|there|what|where|who)"s|(?:i|they|we|what|who|you)"ve)\b (?i)\b(?:(?:i|s?he|they|what|who|you)[`"]ll|(?:are|ca|did|do|does|ha[ds]|have|is|should|were|wo|would)n[`"]t|(?:s?he|let|that|there|what|where|who)[`"]s|(?:i|they|we|what|who|you)[`"]ve)\b
# Should be `background` / `intro text` / `introduction` / `prologue` unless it's a brand or relates to _subterfuge_
(?i)\bpretext\b
# Should be `bearer`
\b(?<=the )burden(?= of bad news\b)
# Should be `bona`
# unless talking about bones
\bbone(?= fide\b)
# Should be `branches`
# ... unless it's really about the meal that replaces breakfast and lunch.
\b[Bb]runches\b
# Should be `briefcase` # Should be `briefcase`
\bbrief-case\b \bbrief-case\b
# Should be `by far` or `far and away`
\bby far and away\b
# Should be `by and large`
\bby in large\b
# Should be `bytes`
# unless talking about sports where a team gets to skip a game, or
# saying `goodbyes` (even this is questionable)
(?<!\\)\bbyes\b
# Should be `can, not only ..., ... also...` # Should be `can, not only ..., ... also...`
\bcan not only.*can also\b \bcan not only.*can also\b
@ -46,7 +127,10 @@
# > In formal writing and where contractions are frowned upon, use `cannot`. # > In formal writing and where contractions are frowned upon, use `cannot`.
# > It is possible to write `can not`, but you generally find it only as part of some other construction, such as `not only . . . but also.` # > It is possible to write `can not`, but you generally find it only as part of some other construction, such as `not only . . . but also.`
# - if you encounter such a case, add a pattern for that case to patterns.txt. # - if you encounter such a case, add a pattern for that case to patterns.txt.
\b[Cc]an not\b \b[Cc]an not\b(?! only\b)
# Should be `chart`
(?i)\bhelm\b.*\bchard\b
# Do not use `(click) here` links # Do not use `(click) here` links
# For more information, see: # For more information, see:
@ -56,19 +140,49 @@
# * https://heyoka.medium.com/dont-use-click-here-f32f445d1021 # * https://heyoka.medium.com/dont-use-click-here-f32f445d1021
(?i)(?:>|\[)(?:(?:click |)here|this(?=\]\([^\)]+:/)|link|(?:read |)more(?!</value))(?:</|\]\() (?i)(?:>|\[)(?:(?:click |)here|this(?=\]\([^\)]+:/)|link|(?:read |)more(?!</value))(?:</|\]\()
# Including "image of" or "picture of" in alt text is unnecessary.
\balt=['"](?:an? |)(?:image|picture) of
# Alt text should be short
\balt=(?:'[^']{126,}'|"[^"]{126,}")
# Should be `effect`
(?<=\btake )affect\b
# Should be `-endian`
\b(?i)(?<=big|little) endian\b
# Should be `equals` to `is equal to` # Should be `equals` to `is equal to`
\bequals to\b \bequals to\b
# Should be `ECMA` 262 (JavaScript)
(?i)\bTS\/EMCA\b|\bEMCA(?: \d|\s*Script)|\bEMCA\b(?=.*\bTS\b)
# Should be `ECMA` 340 (Near Field Communications)
(?i)EMCA[- ]340
# Should be `fall back`
\bfallback(?= to)\b
# Should be `for`, `for, to` or `to`
\b(?:for to|to for)\b
# Should be `GitHub` # Should be `GitHub`
(?<![&*.]|// |\b(?:from|import|type) )\bGithub\b(?![{()]) (?<![&*.]|// |\b(?:from|import|type) )\bGithub\b(?![{()])
# Should be `GitLab` # Should be `GitLab`
(?<![&*.]|// |\b(?:from|import|type) )\bGitlab\b(?![{()]) (?<![&*.]|// |\b(?:from|import|type) )\bGitlab\b(?![{()])
# Should be `heartrending` unless talking about drawing hearts
\b(?i)heart[- ]rendering\b(?![^.?!]*(?:hearts|quirk))
# Should probably be `https://`... # Should probably be `https://`...
# Markdown generally doesn't assume that links are to urls # Markdown generally doesn't assume that links are to urls
\]\(www\.\w \]\(www\.\w
# Should be `intents and purposes`
(?<=[Ff]or all )intensive purposes\b
# Should be `JavaScript` # Should be `JavaScript`
\bJavascript\b \bJavascript\b
@ -84,11 +198,14 @@
# Should be `RabbitMQ` # Should be `RabbitMQ`
\bRabbitmq\b \bRabbitmq\b
# Should be `TensorFlow`
\bTensorflow\b
# Should be `TypeScript` # Should be `TypeScript`
\bTypescript\b \bTypescript\b
# Should be `another` # Should be `another`
\ban[- ]other\b \ban[- ]other(?!-)\b
# Should be `case-(in)sensitive` # Should be `case-(in)sensitive`
\bcase (?:in|)sensitive\b \bcase (?:in|)sensitive\b
@ -108,11 +225,14 @@
# Should be `here-in`, `the`, `them`, `this`, `these` or reworded in some other way # Should be `here-in`, `the`, `them`, `this`, `these` or reworded in some other way
\bthe here(?:\.|,| (?!and|defined)) \bthe here(?:\.|,| (?!and|defined))
# Should be `greater than` # Should be `going to bed` or `going to a bad`
\bhigher than\b \bgoing to bad(?!-)\b
# Should be `ID` # Should be `greater than`
#\bId\b #\bhigher than\b
# Should be `ID` (unless it's a flag/property)
#(?<![-\.])\bId\b(?![(])
# Should be `in front of` # Should be `in front of`
\bin from of\b \bin from of\b
@ -125,14 +245,26 @@
# Should be `use` # Should be `use`
\sin used by\b \sin used by\b
# Should be `in-depth` if used as an adjective (but `in depth` when used as an adverb)
\bin depth\s(?!rather\b)\w{6,}
# Should be `in-flight` or `on the fly` (unless actually talking about airline flights)
\bon[- ]flight\b(?!=\s+(?:(?:\w{2}|)\d+|availability|booking|computer|data|delay|departure|management|performance|radar|reservation|scheduling|software|status|ticket|time|type|.*(?:hotel|taxi)))
# Should be `is obsolete` # Should be `is obsolete`
\bis obsolescent\b \bis obsolescent\b
# Should be `it's` or `its` # Should be `it's` or `its`
\bits['] (?<![.'])\bits[']
# Should be `its` # Should be `its`
\bit's(?= own\b) \bit's(?= (?:child|only purpose|own(?:er|)|parent|sibling)\b)
# Should be `for its` (possessive) or `because it is`
\bfor it(?:'s| is)\b
# Should be `lends`
\bleads(?= credence)
# Should be `log in` # Should be `log in`
\blogin to the \blogin to the
@ -140,12 +272,34 @@
# Should be `long-standing` # Should be `long-standing`
\blong standing\b \blong standing\b
# Should be `lose`
(?<=\bwill )loose\b
# `apt-key` is deprecated
# ... instead you should be writing a pair of files:
# ... * the gpg key added to a distinct key ring file based on your project/distro/key...
# ... * the sources.list in a district file -- not simply appended to `/etc/apt/sources.list` -- (there is a newer format [DEB822](https://manpages.debian.org/bookworm/dpkg-dev/deb822.5.en.html)) that references the gpg key.
# Consider:
# ````sh
# curl http://download.something.example.com/$DISTRO/Release.key | \
# gpg --dearmor --yes --output /usr/share/keyrings/something-distro.gpg
# echo "deb [signed-by=/usr/share/keyrings/something-distro.gpg] http://download.something.example.com/repositories/home:/$DISTRO ./" \
# >> /etc/apt/sources.list.d/something-distro.list
# ````
\bapt-key add\b
# Should be `nearby`
\bnear by\b
# Should probably be a person named `Nick` or the abbreviation `NIC` # Should probably be a person named `Nick` or the abbreviation `NIC`
\bNic\b \bNic\b
# Should be `not supposed` # Should be `not supposed`
\bsupposed not\b \bsupposed not\b
# Should be `Once this` or `On this` or even `One that`. Rarely `One, this`
[?!.] One this\b
# Should probably be `much more` # Should probably be `much more`
\bmore much\b \bmore much\b
@ -153,7 +307,10 @@
\bperform it's\b \bperform it's\b
# Should be `opt-in` # Should be `opt-in`
(?<!\scan|for)(?<!\sif)\sopt in\s (?<!\scan|for)(?<!\smust)(?<!\sif)\sopt in\s
# Should be `out-of-date` if acting as an adjective before a noun
\bout of date(?= \w{3,}\b)
# Should be `less than` # Should be `less than`
\bless then\b \bless then\b
@ -170,24 +327,89 @@
# Should be `on the other hand` # Should be `on the other hand`
\b(?i)on another hand\b \b(?i)on another hand\b
# Reword to `on at runtime` or `enabled at launch`
# The former if you mean it can be changed dynamically.
# The latter if you mean that it can be changed without recompiling but not after the program starts.
\bswitched on runtime\b
# Should be `Of course,`
[?.!]\s+Of course\s(?=[-\w\s]+[.?;!,])
# Most people only have two hands. Reword. # Most people only have two hands. Reword.
\b(?i)on the third hand\b \b(?i)on the third hand\b
# Should be `Open Graph`
# unless talking about a specific Open Graph implementation:
# - Java
# - Node
# - Py
# - Ruby
\bOpenGraph\b
# Should be `OpenShift`
\bOpenshift\b
# Should be `otherwise` # Should be `otherwise`
\bother[- ]wise\b \bother[- ]wise\b
# Should be `; otherwise` or `. Otherwise`
# https://study.com/learn/lesson/otherwise-in-a-sentence.html
, [Oo]therwise\b
# Should probably be `Otherwise,`
(?<=\. )Otherwise\s
# Should be `or (more|less)` # Should be `or (more|less)`
\bore (?:more|less)\b \bore (?:more|less)\b
# Should be `or`
\b(?i)true of .*false\b
# Should be `pale`
\b(?<=beyond the )pail\b
# Should be reworded.
# `passthrough` is an adjective
# `pass-through` could be a noun
# `pass through` would be a verb phrase
\b(?i)passthrough(?= an?\b)
# Should be `rather than` # Should be `rather than`
\brather then\b \brather then\b
# Should be `Red Hat`
\bRed[Hh]at\b
# Should be `regardless, ...` or `regardless of (whether)` # Should be `regardless, ...` or `regardless of (whether)`
\b[Rr]egardless if you\b \b[Rr]egardless if you\b
# Should be `self-signed`
\bself signed\b
# Should be `SendGrid`
\bSendgrid\b
# Should be `set up` (`setup` is a noun / `set up` is a verb)
\b[Ss]etup(?= (?:an?|the)\b)
# Should be `state`
\bsate(?=\b|[A-Z])|(?<=[a-z])Sate(?=\b|[A-Z])|(?<=[A-Z]{2})Sate(?=\b|[A-Z])
# Should be `this`
\b[Tt]oday(?= morning\b)
# Should be `let's` or `let us`
\b[Ll]ets (?=throw\.)
# Should be `no longer needed` # Should be `no longer needed`
\bno more needed\b(?! than\b) \bno more needed\b(?! than\b)
# Should be `<see|look> below for the`
(?i)\bfind below the\b
# Should be `then any` unless there's a comparison before the `,`
, than any\b
# Should be `did not exist` # Should be `did not exist`
\bwere not existent\b \bwere not existent\b
@ -197,9 +419,18 @@
# Should be `nonexistent` # Should be `nonexistent`
\b[Nn]o[nt][- ]existent\b \b[Nn]o[nt][- ]existent\b
# Should be `our`
\bspending out time\b
# Should be `@brief` / `@details` / `@param` / `@return` / `@retval` # Should be `@brief` / `@details` / `@param` / `@return` / `@retval`
(?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b (?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b
# Should be `more than` or `more, then`
\bmore then\b
# Should be `Pipeline`/`pipeline`
(?:(?<=\b|[A-Z])p|P)ipeLine(?:\b|(?=[A-Z]))
# Should be `preexisting` # Should be `preexisting`
[Pp]re[- ]existing [Pp]re[- ]existing
@ -215,6 +446,9 @@
# Should be `prerequisite` # Should be `prerequisite`
[Pp]re[- ]requisite [Pp]re[- ]requisite
# Should be `QuickTime`
\bQuicktime\b
# Should be `recently changed` or `recent changes` # Should be `recently changed` or `recent changes`
[Rr]ecent changed [Rr]ecent changed
@ -224,14 +458,30 @@
# Should be `reentrant` # Should be `reentrant`
[Rr]e[- ]entrant [Rr]e[- ]entrant
# Should be `room for`
\brooms for (?!lease|rent|sale)
# Should be `socioeconomic`
# https://dictionary.cambridge.org/us/dictionary/english/socioeconomic
socio-economic
# Should be `strong suit` # Should be `strong suit`
\b(?:my|his|her|their) strong suite\b \b(?:my|his|her|their) strong suite\b
# Should probably be `temperatures` unless actually talking about thermal drafts (things birds may fly on)
\bthermals\b
# Should be `there are` or `they are` (or `they're`)
(?i)\btheir are\b
# Should be `understand` # Should be `understand`
\bunder stand\b \bunder stand\b
# Should be `URI` or `uri` unless it refers to a person named `Uri` # Should be `URI` or `uri` unless it refers to a person named `Uri` (or a flag)
#(?<!\.)\bUri\b(?![(]) #(?<![-\.])\bUri\b(?![(])
# Should be `true`
(?i)(?<![\[\]()])\brue(?:= or false)
# Should be `it uses is` # Should be `it uses is`
/\bis uses is\b/ /\bis uses is\b/
@ -245,12 +495,43 @@
# Should be `where` # Should be `where`
\bwere they are\b \bwere they are\b
# Should be `why`
, way(?= is [^.]*\?)
# should be `vCenter` # should be `vCenter`
\bV[Cc]enter\b \bV[Cc]enter\b
# Should be `VM` # Should be `VM`
\bVm\b \bVm\b
# Should be `walkthrough(s)`
\bwalk-throughs?\b
# Should be `want`
\bdon't ant\b
# Should be `we'll`
\bwe 'll\b
# Should be `week`
# unless you're really talking about people or pointers
\bevery weak[.,?!]
# Should be `well`
\b[Yy]ou(?:'re| are) doing good\b
# Should be `whereas`
\bwhere as\b
# Should be `WinGet`
\bWinget\b
# Should be `without` (unless `out` is a modifier of the next word)
\bwith out\b(?!-)
# Should be `work around`
\b[Ww]orkaround(?= an?\b)
# Should be `workarounds` # Should be `workarounds`
#\bwork[- ]arounds\b #\bwork[- ]arounds\b
@ -267,15 +548,15 @@
\b(?:coarse|fine) grained\b \b(?:coarse|fine) grained\b
# Homoglyph (Cyrillic) should be `A`/`B`/`C`/`E`/`H`/`I`/`I`/`J`/`K`/`M`/`O`/`P`/`S`/`T`/`Y` # Homoglyph (Cyrillic) should be `A`/`B`/`C`/`E`/`H`/`I`/`I`/`J`/`K`/`M`/`O`/`P`/`S`/`T`/`Y`
# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this. # It's possible that your content is intentionally mixing Cyrillic and Latin scripts, but if it isn't, you definitely want to correct this.
(?<=[A-Z]{2})[АВСЕНІӀЈКМОРЅТУ]|[АВСЕНІӀЈКМОРЅТУ](?=[A-Z]+(?:\b|[a-z]+)|[a-z]+(?:[^a-z]|$)) (?<=[A-Z]{2})[АВСЕНІӀЈКМОРЅТУ]|[АВСЕНІӀЈКМОРЅТУ](?=[A-Z]+(?:\b|[a-z]+)|[a-z]+(?:[^a-z]|$))
# Homoglyph (Cyrillic) should be `a`/`b`/`e` # Homoglyph (Cyrillic) should be `a`/`b`/`c`/`e`/`o`/`p`/`x`/`y`
# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this. # It's possible that your content is intentionally mixing Cyrillic and Latin scripts, but if it isn't, you definitely want to correct this.
[аве](?=[A-Za-z]{2,})|(?<=[A-Za-z]{2})[аве]|(?<=[A-Za-z])[аве](?=[A-Za-z]) [авсеорху](?=[A-Za-z]{2,})|(?<=[A-Za-z]{2})[авсеорху]|(?<=[A-Za-z])[авсеорху](?=[A-Za-z])
# Should be `neither/nor` -- or reword # Should be `neither/nor` -- or reword
#(?!<do )\bnot\b([^.?!"/(](?!neither|,.*?,))+\bnor\b #(?<!do )\bnot\b([^.?!"/(](?!neither|,.*?,))+\bnor\b
# Should be `neither/nor` (plus rewording the beginning) # Should be `neither/nor` (plus rewording the beginning)
# This is probably a double negative... # This is probably a double negative...

View File

@ -1,31 +1,36 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns # See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
# #includes # Gaelic
^\s*#include\s*(?:<.*?>|".*?") Gàidhlig
# #pragma lib Ov_erwrite
^\s*#pragma comment\(lib, ".*?"\)
# languageHashTable # languageHashTable
"\w+(?:-\w+|)"\s+=\s+@\(".*"\) "\w+(?:-\w+|)"\s+=\s+@\(".*"\)
# wikipedia # Regular expression with `\b`
\b\w\w\.wikipedia\.org/wiki/[-\w%.#]+ \\b(?=[a-z]\S*\{)
# css fonts # long lorem
\bfont-family:[^;}]+ L"Lorem.*"
# .github/policies/resourceManagement.yml
pattern: '.*'
# tabs in c# # tabs in c#
\$"\\t \$"\\t
# Hexadecimal character pattern in code # Hexadecimal character pattern in code
\\x[0-9a-fA-F][0-9a-fA-F] \\x[0-9a-fA-F]{4}
fontFamily": ".*"
D[23]D(?=[A-Z][a-z])
(?<=[a-z])3D(?=[A-Z])
\.monitorId = \{ .*\}
json::value\(L"\S+"
# windows line breaks in strings # windows line breaks in strings
\\r\\n \\r\\n(?=[A-Za-z])
# power shell gallery website # power shell gallery website
\bpowershellgallery.com/[-_a-zA-Z0-9()=./%]* \bpowershellgallery.com/[-_a-zA-Z0-9()=./%]*
@ -35,9 +40,22 @@ L?(["']|[-<({>]|\b)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{10,12}(?:\g{
(?:L"[abAB]+", ){3}L"[abAB]+" (?:L"[abAB]+", ){3}L"[abAB]+"
# hit-count: 1 file-count: 1 \. (?: @[-A-Za-z\d]+\b(?!\.[A-Z]),?)+
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$ auto deviceId = L".*"
deviceId(?:\.id|) = L".*"
StringComparer.OrdinalIgnoreCase\) \{.*\}
# namespaces
\b[a-z]+::
"Author": ".+"
(?:Include|Link)=".*?"
# You could ignore `xmlns`, but it's probably better to enforce rules about them...
#\s(?:xmlns:[a-z]+(?:[A-Z][a-z]+|)=|[a-z]+(?:[A-Z][a-z]+):(?=[a-z]+=))
# UnitTests # UnitTests
\[DataRow\(.*\)\] \[DataRow\(.*\)\]
@ -50,142 +68,135 @@ L?(["']|[-<({>]|\b)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{10,12}(?:\g{
# Automatically suggested patterns # Automatically suggested patterns
# hit-count: 3715 file-count: 992 # hit-count: 5402 file-count: 1339
# IServiceProvider / isAThing # IServiceProvider / isAThing
(?:\b|_)(?:(?:ns|)I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b)) (?:(?:\b|_|(?<=[a-z]))[IT]|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
# hit-count: 404 file-count: 42 # hit-count: 2073 file-count: 842
# base64 encoded content, possibly wrapped in mime # #includes
(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$) ^\s*#include\s*(?:<.*?>|".*?")
# hit-count: 402 file-count: 160 # hit-count: 1639 file-count: 855
# C# includes
^\s*using [^;]+;
# hit-count: 1491 file-count: 693
# microsoft
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
# hit-count: 398 file-count: 133
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u\{?|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# hit-count: 339 file-count: 146
# hex runs # hex runs
\b[0-9a-fA-F]{16,}\b \b[0-9a-fA-F]{16,}\b
# hit-count: 337 file-count: 110 # hit-count: 253 file-count: 100
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# hit-count: 311 file-count: 43
# D2D
D?2D(?!efault)
# hit-count: 272 file-count: 75
# GitHub SHAs (markdown) # GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|) (?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
# hit-count: 146 file-count: 27 # hit-count: 241 file-count: 37
# version suffix <word>v# # version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) (?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# hit-count: 105 file-count: 103 # hit-count: 141 file-count: 6
# Contributor / Project
\[[^\]\s]+\]\(https://github\.com/[^)]+\)(?: -(?: [A-Z]\S+)+|)|\[[^\]]+\]\(https://github\.com/(?:[^/\s"]+/?){1,2}\)
https://github.com/(?:[-\w]+/?){1,2}
# hit-count: 131 file-count: 125
# Repeated letters
\b([a-z])\g{-1}{2,}\b
# hit-count: 99 file-count: 97
# w3 # w3
\bw3\.org/[-0-9a-zA-Z/#.]+ \bw3\.org/[-0-9a-zA-Z/#.]+
# hit-count: 94 file-count: 6 # hit-count: 59 file-count: 11
# Contributor
\[[^\]]+\]\(https://github\.com/[^/\s"]+/?\)
RegExp\(([`'"]).*?\g{-1}\)|(?:escapes|regEx):\s*(?:/.*/|([`'"]).*?\g{-1})|return/.*?/
# hit-count: 65 file-count: 38
# regex choice
\(\?:[^)]+\|[^)]+\)
# hit-count: 37 file-count: 14
# Markdown anchor links # Markdown anchor links
\(#\S*?[a-zA-Z]\S*?\) \(#\S*?[a-zA-Z]\S*?\)
# hit-count: 33 file-count: 5 # hit-count: 29 file-count: 23
# base64 encoded pkcs
\bMII[-a-zA-Z=;:/0-9+]+
# hit-count: 28 file-count: 22
# stackexchange -- https://stackexchange.com/feeds/sites # stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/) \b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
# hit-count: 14 file-count: 3 # hit-count: 24 file-count: 11
# node packages # Library prefix
(["'])@[^/'" ]+/[^/'" ]+\g{-1} # e.g., `lib`+`archive`, `lib`+`raw`, `lib`+`unwind`
# (ignores some words that happen to start with `lib`)
(?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
# hit-count: 13 file-count: 1 # hit-count: 20 file-count: 2
# Intel intrinsics # Intel intrinsics
_mm_(?!dd)\w+ _mm\d*_(?!dd)\w+
# hit-count: 11 file-count: 5 # hit-count: 15 file-count: 8
# URL escaped characters
%[0-9A-F][A-F](?=[A-Za-z])
# hit-count: 9 file-count: 5
# Wikipedia # Wikipedia
\ben\.wikipedia\.org/wiki/[-\w%.#]+ \ben\.wikipedia\.org/wiki/[-\w%.#]+
# hit-count: 5 file-count: 4 # hit-count: 14 file-count: 10
# vs devops # vs devops
\bvisualstudio.com(?::443|)/[-\w/?=%&.]* \bvisualstudio.com(?::443|)/[-\w/?=%&.]*
# hit-count: 5 file-count: 4 # hit-count: 8 file-count: 2
# Alternatively, if you're using check-spelling v0.0.25+, and you would like to _check_ the Non-English content for spelling errors, you can. For information on how to do so, see: # copyright
# https://docs.check-spelling.dev/Feature:-Configurable-word-characters.html#unicode Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
# hit-count: 4 file-count: 4 # hit-count: 8 file-count: 1
# microsoft # css fonts
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|developer|docs|learn|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%#]* \bfont(?:-family|):[^;}]+
aka\.ms/[a-zA-Z0-9]+ aka\.ms/[a-zA-Z0-9]+
# hit-count: 8 file-count: 1
# kubernetes crd patterns
^\s*pattern: .*$
# hit-count: 5 file-count: 3
# URL escaped characters
%[0-9A-F][A-F](?=[A-Za-z])
# hit-count: 3 file-count: 3 # hit-count: 3 file-count: 3
# githubusercontent # githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]* /[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
# hit-count: 3 file-count: 2 # hit-count: 2 file-count: 2
# css url wrappings # medium
\burl\([^)]+\) \bmedium\.com/@?[^/\s"]+/[-\w:/*.]+
# hit-count: 3 file-count: 1
# kubernetes crd patterns
^\s*pattern: .*$
# hit-count: 3 file-count: 1
# Lorem
# Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally )
# grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review -
# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
# ... Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
# ... You could manually change `(?i)X...` to use `[Xx]...`
# ... or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
(?:(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*)
# hit-count: 3 file-count: 1
# libraries
(?:\b|_)lib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
# hit-count: 2 file-count: 1 # hit-count: 2 file-count: 1
# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there # While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
# YouTube url # YouTube url
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]* \b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
# hit-count: 1 file-count: 1 # hit-count: 2 file-count: 1
# GHSA
GHSA(?:-[0-9a-z]{4}){3}
# hit-count: 1 file-count: 1
# GitHub actions # GitHub actions
\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+ \buses:\s+[-\w.]+/[-\w./]+@[-\w.]+
# hit-count: 1 file-count: 1 # hit-count: 1 file-count: 1
# medium # curl arguments
\bmedium\.com/@?[^/\s"]+/[-\w]+ \b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# hit-count: 1 file-count: 1
# sha-... -- uses a fancy capture
(\\?['"]|&quot;)[0-9a-f]{40,}\g{-1}
# hit-count: 1 file-count: 1 # hit-count: 1 file-count: 1
# tar arguments # tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+ \b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# #pragma lib
^\s*#pragma comment\(lib, ".*?"\)
# UnitTests
\[DataRow\(.*\)\]
# AdditionalDependencies
<AdditionalDependencies>.*<
# the last line of mimetype="application/x-microsoft.net.object.bytearray.base64" things in .resx files
^\s*[-a-zA-Z=;:/0-9+]*[-a-zA-Z;:/0-9+][-a-zA-Z=;:/0-9+]*=$
RegExp\(@?([`'"]).*?\g{-1}\)|(?:escapes|regEx):\s*(?:/.*/|([`'"]).*?\g{-1})|return/.*?/
# Questionably acceptable forms of `in to` # Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object # Personally, I prefer `log into`, but people object
# https://www.tprteaching.com/log-into-log-in-to-login/ # https://www.tprteaching.com/log-into-log-in-to-login/
@ -194,13 +205,16 @@ GHSA(?:-[0-9a-z]{4}){3}
# to opt in # to opt in
\bto opt in\b \bto opt in\b
# pass(ed|ing) in
\bpass(?:ed|ing) in\b
# acceptable duplicates # acceptable duplicates
# ls directory listings # ls directory listings
[-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+[.\d]+(?:[KMGT]|)\s+ [-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+[.\d]+(?:[KMGT]|)\s+
# mount # mount
\bmount\s+-t\s+(\w+)\s+\g{-1}\b \bmount\s+-t\s+(\w+)\s+\g{-1}\b
# C types and repeated CSS values # C types and repeated CSS values
\s(auto|buffalo|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s \s(auto|buffalo|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?:\s\g{-1})+\s
# C enum and struct # C enum and struct
\b(?:enum|struct)\s+(\w+)\s+\g{-1}\b \b(?:enum|struct)\s+(\w+)\s+\g{-1}\b
# go templates # go templates
@ -232,9 +246,11 @@ _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING
# ignore long runs of a single character: # ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b \b([A-Za-z])\g{-1}{3,}\b
# hit-count: 1 file-count: 1
# Amazon # Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|) \bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)[^"'\s]+
# hit-count: 3 file-count: 3
# imgur # imgur
\bimgur\.com/[^.]+ \bimgur\.com/[^.]+

View File

@ -1,8 +1,17 @@
^attache$ ^attache$
^bellow$ ^bellows?$
benefitting benefitting
occurences? occurences?
^dependan.* ^dependan.*
^develope$
^developement$
^developpe
^Devers?$
^devex
^devide
^Devinn?[ae]
^devisal
^devisor
^diables?$ ^diables?$
^oer$ ^oer$
Sorce Sorce
@ -10,4 +19,5 @@ Sorce
^Teh$ ^Teh$
^untill$ ^untill$
^untilling$ ^untilling$
^venders?$
^wether.* ^wether.*

View File

@ -105,7 +105,7 @@ jobs:
report-timing: 1 report-timing: 1
warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end
experimental_apply_changes_via_bot: 1 experimental_apply_changes_via_bot: 1
use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} use_sarif: 1
check_extra_dictionaries: "" check_extra_dictionaries: ""
dictionary_source_prefixes: > dictionary_source_prefixes: >
{ {
@ -113,37 +113,28 @@ jobs:
} }
extra_dictionaries: | extra_dictionaries: |
cspell:software-terms/softwareTerms.txt cspell:software-terms/softwareTerms.txt
cspell:cpp/stdlib-c.txt
cspell:cpp/stdlib-cpp.txt cspell:cpp/stdlib-cpp.txt
cspell:filetypes/filetypes.txt cspell:filetypes/filetypes.txt
cspell:cpp/stdlib-c.txt
cspell:lorem-ipsum/dictionary.txt
cspell:python/python/python-lib.txt
cspell:php/php.txt cspell:php/php.txt
cspell:fullstack/fullstack.txt
cspell:dotnet/dotnet.txt
cspell:swift/swift.txt
cspell:node/node.txt
cspell:dart/dart.txt cspell:dart/dart.txt
cspell:django/django.txt cspell:dotnet/dotnet.txt
cspell:python/python/python.txt
cspell:powershell/powershell.txt cspell:powershell/powershell.txt
cspell:npm/npm.txt
cspell:golang/go.txt
cspell:cpp/compiler-msvc.txt
cspell:csharp/csharp.txt cspell:csharp/csharp.txt
cspell:html/html.txt cspell:python/python/python-lib.txt
cspell:node/node.txt
cspell:golang/go.txt
cspell:npm/npm.txt
cspell:fullstack/fullstack.txt
cspell:css/css.txt
cspell:java/java.txt cspell:java/java.txt
cspell:aws/aws.txt
cspell:typescript/typescript.txt cspell:typescript/typescript.txt
cspell:cpp/lang-keywords.txt cspell:html/html.txt
cspell:r/r.txt
cspell:aws/aws.txt
cspell:cpp/compiler-msvc.txt
cspell:python/common/extra.txt cspell:python/common/extra.txt
cspell:scala/scala.txt cspell:scala/scala.txt
cspell:shell/shell-all-words.txt
cspell:css/css.txt
cspell:r/r.txt
cspell:java/java-terms.txt
cspell:cpp/stdlib-cerrno.txt
cspell:k8s/k8s.txt
comment-push: comment-push:
name: Report (Push) name: Report (Push)

View File

@ -472,7 +472,7 @@ jobs:
# This saves ~1GiB per architecture. We won't need these later. # This saves ~1GiB per architecture. We won't need these later.
# Removes: # Removes:
# - All .pdbs from any static libs .libs (which were only used during linking) # - All .pdb files from any static libs .libs (which were only used during linking)
- pwsh: |- - pwsh: |-
$binDir = '$(Build.SourcesDirectory)' $binDir = '$(Build.SourcesDirectory)'
$ImportLibs = Get-ChildItem $binDir -Recurse -File -Filter '*.exp' | ForEach-Object { $_.FullName -Replace "exp$","lib" } $ImportLibs = Get-ChildItem $binDir -Recurse -File -Filter '*.exp' | ForEach-Object { $_.FullName -Replace "exp$","lib" }

View File

@ -183,9 +183,9 @@ ZoomIt source code was originally implemented by [Sysinternals](https://sysinter
- [@cinnamon-msft](https://github.com/cinnamon-msft) - Kayla Cinnamon - Lead - [@cinnamon-msft](https://github.com/cinnamon-msft) - Kayla Cinnamon - Lead
- [@craigloewen-msft](https://github.com/craigloewen-msft) - Craig Loewen - Product Manager - [@craigloewen-msft](https://github.com/craigloewen-msft) - Craig Loewen - Product Manager
- [@niels9001](https://github.com/niels9001/) - Niels Laute - Product Manager - [@niels9001](https://github.com/niels9001/) - Niels Laute - Product Manager
- [@dhowett](https://github.com/dhowett) - Dustin Howett - Dev lead - [@dhowett](https://github.com/dhowett) - Dustin Howett - Dev Lead
- [@yeelam-gordon](https://github.com/yeelam-gordon) - Gordon Lam - Dev lead - [@yeelam-gordon](https://github.com/yeelam-gordon) - Gordon Lam - Dev Lead
- [@jamrobot](https://github.com/jamrobot) - Jerry Xu - Dev lead - [@jamrobot](https://github.com/jamrobot) - Jerry Xu - Dev Lead
- [@lei9444](https://github.com/lei9444) - Leilei Zhang - Dev - [@lei9444](https://github.com/lei9444) - Leilei Zhang - Dev
- [@shuaiyuanxx](https://github.com/shuaiyuanxx) - Shawn Yuan - Dev - [@shuaiyuanxx](https://github.com/shuaiyuanxx) - Shawn Yuan - Dev
- [@moooyo](https://github.com/moooyo) - Yu Leng - Dev - [@moooyo](https://github.com/moooyo) - Yu Leng - Dev
@ -225,4 +225,4 @@ ZoomIt source code was originally implemented by [Sysinternals](https://sysinter
- [@donlaci](https://github.com/donlaci) - Laszlo Nemeth - Dev - [@donlaci](https://github.com/donlaci) - Laszlo Nemeth - Dev
- [@SeraphimaZykova](https://github.com/SeraphimaZykova) - Seraphima Zykova - Dev - [@SeraphimaZykova](https://github.com/SeraphimaZykova) - Seraphima Zykova - Dev
- [@stefansjfw](https://github.com/stefansjfw) - Stefan Markovic - Dev - [@stefansjfw](https://github.com/stefansjfw) - Stefan Markovic - Dev
- [@jaimecbernardo](https://github.com/jaimecbernardo) - Jaime Bernardo - Dev lead - [@jaimecbernardo](https://github.com/jaimecbernardo) - Jaime Bernardo - Dev Lead

View File

@ -47,7 +47,7 @@
<!-- Add ability to run tests via "msbuild /t:Test" --> <!-- Add ability to run tests via "msbuild /t:Test" -->
<!-- <!--
Workaround an MSBuild bug where Microsoft.Common.Test.targets is missing from the Arm64 installation. Work around an MSBuild bug where Microsoft.Common.Test.targets is missing from the Arm64 installation.
See: https://github.com/dotnet/msbuild/pull/9984 See: https://github.com/dotnet/msbuild/pull/9984
NB 1: This means that using "/t:Test" is not supported for Arm64 builds and tests will need to be run in an alternate way, NB 1: This means that using "/t:Test" is not supported for Arm64 builds and tests will need to be run in an alternate way,
eg running tests in VS or invoking vstest.console directly. eg running tests in VS or invoking vstest.console directly.

View File

@ -9,4 +9,4 @@ The following must be kept in mind regarding compatibility with settings v1 and
- The status of each of the modules is communicated with the runner in the form of a json object. The names of all the powerToys is set in the [`EnableModules.cs`](src/settings-ui/Settings.UI.Library/EnabledModules.cs) file. The `JsonPropertyName` must not be changed to ensure that the information is dispatched properly to all the modules by the runner. - The status of each of the modules is communicated with the runner in the form of a json object. The names of all the powerToys is set in the [`EnableModules.cs`](src/settings-ui/Settings.UI.Library/EnabledModules.cs) file. The `JsonPropertyName` must not be changed to ensure that the information is dispatched properly to all the modules by the runner.
### ImageResizer anomaly ### ImageResizer anomaly
All the powertoys have the same folder name as well as JsonPropertyName to communicate information with the runner. However that is not the case with ImageResizer. The folder name is `ImageResizer` whereas the JsonPropertyName is `Image Resizer`(Note the additional space). This should not be changed to ensure backward compatibility as well as proper functioning of the module. All the powertoys have the same folder name as well as JsonPropertyName to communicate information with the runner. However that is not the case with ImageResizer. The folder name is `ImageResizer` whereas the JsonPropertyName has an additional space: `Image Resizer`. This should not be changed to ensure backward compatibility as well as proper functioning of the module.

View File

@ -1,6 +1,6 @@
# What is it # What is it
We would like to enable our users to use [`winget configure`](https://learn.microsoft.com/en-us/windows/package-manager/winget/configure) command to install PowerToys and configure its settings with a [Winget configuration file](https://learn.microsoft.com/en-us/windows/package-manager/configuration/create). For example: We would like to enable our users to use [`winget configure`](https://learn.microsoft.com/en-us/windows/package-manager/winget/configure) command to install PowerToys and configure its settings with a [WinGet configuration file](https://learn.microsoft.com/en-us/windows/package-manager/configuration/create). For example:
```yaml ```yaml
properties: properties:
@ -35,7 +35,7 @@ This should install PowerToys and make `PowerToysConfigure` resource available.
PowerToys.Settings.exe set <ModuleName>.<SettingName> <SettingValue> PowerToys.Settings.exe set <ModuleName>.<SettingName> <SettingValue>
``` ```
So for the example the config above should perform 3 following invocations: So for example the config above should perform 3 following invocations:
``` ```
PowerToys.Settings.exe set ShortcutGuide.Enabled false PowerToys.Settings.exe set ShortcutGuide.Enabled false
PowerToys.Settings.exe set FancyZones.Enabled true PowerToys.Settings.exe set FancyZones.Enabled true

View File

@ -1,25 +1,25 @@
# Viewmodels # View Models
The viewmodels are located within the [`Settings.UI.Library`](/src/settings-ui/Settings.UI.Library) project. The view models are located within the [`Settings.UI.Library`](/src/settings-ui/Settings.UI.Library) project.
## Components ## Components
- Each viewmodel takes in the general `settingsRepository`, the `moduleSettingsRepository` if it exists and the delegates for IPC communication. - Each view model takes in the general `settingsRepository`, the `moduleSettingsRepository` if it exists and the delegates for IPC communication.
- The general `settingsRepository` contains the general configurations of all powertoys whereas the `moduleSettingsRepository` is specific to the module. This is to ensure that the configuration details are shared amongst the viewmodels without having to re-open the `settings.json` file. - The general `settingsRepository` contains the general configurations of all powertoys whereas the `moduleSettingsRepository` is specific to the module. This is to ensure that the configuration details are shared amongst the viewmodels without having to re-open the `settings.json` file.
- Whenever there is a change in the UI, the `OnPropertyChanged` event is invoked and the viewmodel sends a corresponding IPC message to the runner which would perform the designated action such as dispatching the change to the modules or enabling/disabling the powertoy etc. - Whenever there is a change in the UI, the `OnPropertyChanged` event is invoked and the view model sends a corresponding IPC message to the runner which would perform the designated action such as dispatching the change to the modules or enabling/disabling the powertoy, etc.
#### Difference between viewmodels #### Difference between view models
- The [`GeneralViewModel`](/src/settings-ui/Settings.UI.Library/ViewModels/GeneralViewModel.cs) is different from the rest of the view models with regard to the IPC communication wherein it sends special IPC messages to the runner to check for updates and to restart as admin. - The [`GeneralViewModel`](/src/settings-ui/Settings.UI.Library/ViewModels/GeneralViewModel.cs) is different from the rest of the view models with regard to the IPC communication wherein it sends special IPC messages to the runner to check for updates and to restart as admin.
- Each of the powerToy viewmodels have two types of IPC communications, one for the general status of the powerToy and the other for communication powerToy specific change in properties to the runner. - Each of the powerToy view models have two types of IPC communications, one for the general status of the powerToy and the other for communication powerToy specific change in properties to the runner.
## [`SettingsRepository`](src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs) ## [`SettingsRepository`](src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs)
- The [`SettingsRepository`](src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs) is a generic singleton which contains the configurations for each viewmodel. - The [`SettingsRepository`](src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs) is a generic singleton which contains the configurations for each view model.
- As it is a generic singleton, there can only be one instance of the settings repository of a particular type. This ensures that all the viewmodels are modifying a common object and a change made in one locations reflects everywhere. - As it is a generic singleton, there can only be one instance of the settings repository of a particular type. This ensures that all the view models are modifying a common object and a change made in one locations reflects everywhere.
- The singleton implementation is thread-safe. Unit tests have been added for the same. - The singleton implementation is thread-safe. Unit tests have been added for the same.
### Settings viewmodel anomalies ### Settings view model anomalies
- The reason behind using the `SettingsRepository` is to ensure that the settings process does not try to access the `settings.json` files directly but rather does it through this class which encapsulates all the file operations from the viewmodels. - The reason behind using the `SettingsRepository` is to ensure that the settings process does not try to access the `settings.json` files directly but rather does it through this class which encapsulates all the file operations from the view models.
- However, this could not be expanded to all the viewmodels directly for the following reasons. Some refactoring must be done to unify these cases and to bring them under the same model: - However, this could not be expanded to all the view models directly for the following reasons. Some refactoring must be done to unify these cases and to bring them under the same model:
- The PowerRename viewmodel does not save the settings configurations in the same format as the rest of the powertoys, ie. {name, version, properties}. However, it only stores the properties directly. - The PowerRename view model does not save the settings configurations in the same format as the rest of the powertoys, i.e. {name, version, properties}. However, it only stores the properties directly.
- Some viewmodels expect the runner to create the file instead of creating the file themselves, like in keyboard manager. - Some view models expect the runner to create the file instead of creating the file themselves, like in keyboard manager.
- The colorpicker powertoy creates the `settings.json` within the module. This must be taken care of when encapsulated within the settingsRepository. - The colorpicker powertoy creates the `settings.json` within the module. This must be taken care of when encapsulated within the settingsRepository.
- Currently, all modules use the `SettingsRepository` to access the General Settings config. - Currently, all modules use the `SettingsRepository` to access the General Settings config.
- However, only FancyZones, ShortcutGuide and PowerPreview use the `SettingsRepository` to access the module properties. - However, only FancyZones, ShortcutGuide and PowerPreview use the `SettingsRepository` to access the module properties.

View File

@ -159,7 +159,7 @@ This can be done by adding the directory name of the project to [Product.wxs nea
We should also ensure the new dlls are signed by the pipeline. Currently all dlls of the form [`*.resources.dll` are signed](https://github.com/microsoft/PowerToys/blob/f92bd6ffd38014c228544bb8d68d0937ce4c2b6d/.pipelines/pipeline.user.windows.yml#L68). We should also ensure the new dlls are signed by the pipeline. Currently all dlls of the form [`*.resources.dll` are signed](https://github.com/microsoft/PowerToys/blob/f92bd6ffd38014c228544bb8d68d0937ce4c2b6d/.pipelines/pipeline.user.windows.yml#L68).
**Note:** The resource dlls should be added to the MSI project only after the initial commit with the lcl files has been done by the Localization team. Otherwise the pipeline will fail as there wouldn't be any resx files to generate the dlls. **Note:** The resource dlls should be added to the MSI project only after the initial commit with the lcl files has been done by the Localization team. Otherwise, the pipeline will fail as there wouldn't be any resx files to generate the dlls.
## Working With Strings ## Working With Strings

View File

@ -56,7 +56,7 @@ string validUIDisplayString = Resources.ValidUIDisplayString;
``` ```
## More On Coding Guidance ## More On Coding Guidance
Please review these brief docs below relating to our coding standards etc. Please review these brief docs below relating to our coding standards, etc.
* [Coding Style](./style.md) * [Coding Style](./style.md)
* [Code Organization](./readme.md) * [Code Organization](./readme.md)

View File

@ -162,4 +162,4 @@ This can be done by adding the directory name of the project to [Product.wxs nea
We should also ensure the new dlls are signed by the pipeline. Currently all dlls of the form [`*.resources.dll` are signed](https://github.com/microsoft/PowerToys/blob/f92bd6ffd38014c228544bb8d68d0937ce4c2b6d/.pipelines/pipeline.user.windows.yml#L68). We should also ensure the new dlls are signed by the pipeline. Currently all dlls of the form [`*.resources.dll` are signed](https://github.com/microsoft/PowerToys/blob/f92bd6ffd38014c228544bb8d68d0937ce4c2b6d/.pipelines/pipeline.user.windows.yml#L68).
**Note:** The resource dlls should be added to the MSI project only after the initial commit with the lcl files has been done by the Localization team. Otherwise the pipeline will fail as there wouldn't be any resx files to generate the dlls. **Note:** The resource dlls should be added to the MSI project only after the initial commit with the lcl files has been done by the Localization team. Otherwise, the pipeline will fail as there wouldn't be any resx files to generate the dlls.

View File

@ -55,7 +55,7 @@ The module is initialized in the AlwaysOnTop class. During initialization, the f
The AlwaysOnTop class handles the pinning and unpinning of windows. Key methods include: The AlwaysOnTop class handles the pinning and unpinning of windows. Key methods include:
- **PinTopmostWindow**: Pins the specified window on top of others and applies visual indicators - **PinTopmostWindow**: Pins the specified window on top of others and applies visual indicators
- **UnpinTopmostWindowss**: Removes the pinning status and visual indicators from the specified window - **UnpinTopmostWindows**: Removes the pinning status and visual indicators from the specified window
- **AssignBorder**: Applies a colored border around the pinned window based on user settings - **AssignBorder**: Applies a colored border around the pinned window based on user settings
### Settings Management ### Settings Management

View File

@ -68,4 +68,4 @@ EnvironmentVariableUILib # Abstracted UI methods and implementations
- The module reads and writes variables directly to the registry instead of using the Environment API - The module reads and writes variables directly to the registry instead of using the Environment API
- This direct registry access approach is used because the Environment API automatically expands variables and has a timeout for notifications - This direct registry access approach is used because the Environment API automatically expands variables and has a timeout for notifications
- When a profile variable has the same name as an existing User variable, a backup is created with a naming pattern: `VARIABLE_NAME_powertoys_PROFILE_NAME` - When a profile variable has the same name as an existing User variable, a backup is created with the naming pattern: `VARIABLE_NAME_powertoys_PROFILE_NAME`

View File

@ -444,10 +444,12 @@ PowerToys/doc/releases/tests-checklist-template.md at releaseChecklist · micros
- ### First Run FancyZones error - ### First Run FancyZones error
![Debug Step Image](../images/fancyzones/16.png) ![Debug Step Image](../images/fancyzones/16.png)
If you encounter this situation, you need to launch the FancyZones Editor once in the powertoys settings UI (Refer to the image below). The reason is that running the Editor directly within the project will not initialize various configuration files. If you encounter this situation, you need to launch the FancyZones Editor once in the powertoys settings UI:
![Debug Step Image](../images/fancyzones/17.png) ![Debug Step Image](../images/fancyzones/17.png)
The reason is that running the Editor directly within the project will not initialize various configuration files.
- ### How are layouts stored and loaded? Is there a central configuration handler? - ### How are layouts stored and loaded? Is there a central configuration handler?
There is no central configuration handler. There is no central configuration handler.
@ -471,7 +473,7 @@ When the Editor starts, it will load the config data, and when FancyZones starts
About monitor detection you can find "FancyZones::MoveSizeUpdate" function. About monitor detection you can find "FancyZones::MoveSizeUpdate" function.
I believe that in the case without DPI scaling, FancyZones retrieves the window's position and does not need to know what the mouse's DPI scaling is like. If you are referring to window scaling, it is called through the system interface, and you can see the detailed code in "WindowMouseSnap::MoveSizeEnd()" fucntion. I believe that in the case without DPI scaling, FancyZones retrieves the window's position and does not need to know what the mouse's DPI scaling is like. If you are referring to window scaling, it is called through the system interface, and you can see the detailed code in "WindowMouseSnap::MoveSizeEnd()" function.
- ### How does FancyZones track which windows belong to which zones? - ### How does FancyZones track which windows belong to which zones?

View File

@ -50,7 +50,7 @@ For more details on the implementation approach, see the [Dual Registration sect
Image Resizer dynamically determines when to show the context menu option: Image Resizer dynamically determines when to show the context menu option:
- `AppxManifest.xml` registers the extension for all file types (`Type="*"`) - `AppxManifest.xml` registers the extension for all file types (`Type="*"`)
- The shell extension checks if the selected files are images using `AssocGetPerceivedType()` - The shell extension checks if the selected files are images using `AssocGetPerceivedType()`
- The menu appears only for image files (returns `ECS_ENABLED`), otherwise it remains hidden (returns `ECS_HIDDEN`) - The menu appears only for image files (returns `ECS_ENABLED`); otherwise, it remains hidden (returns `ECS_HIDDEN`)
This approach provides flexibility to support additional file types by modifying only the detection logic without changing the system-level registration. This approach provides flexibility to support additional file types by modifying only the detection logic without changing the system-level registration.

View File

@ -86,7 +86,7 @@ Returns true if successful.
virtual void set_config(const wchar_t* config) virtual void set_config(const wchar_t* config)
``` ```
After the user has changed the module settings in the Settings editor, the runner calls this method to pass to the module the updated values. It's a good place to save the settings as well. After the user has changed the module settings in the Settings editor, the runner calls this method to pass the updated values to the module. It's a good place to save the settings as well.
## call_custom_action ## call_custom_action

View File

@ -58,7 +58,7 @@ This file contains documentation for all the methods involved in key/shortcut re
[This method](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/KeyboardEventHandlers.cpp#L754-L809) is used for handling app-specific shortcut to shortcut and shortcut to key remaps. The general logic is as follows: [This method](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/KeyboardEventHandlers.cpp#L754-L809) is used for handling app-specific shortcut to shortcut and shortcut to key remaps. The general logic is as follows:
- Check if the `dwExtraInfo` field is set to `KEYBOARDMANAGER_SHORTCUT_FLAG`. This indicates that the key event was generated by the KBM shortcut remap method using `SendInput`. This ensures that we don't read events generated by the shortcut remap method, but we still read events which are generated by the key remap method. - Check if the `dwExtraInfo` field is set to `KEYBOARDMANAGER_SHORTCUT_FLAG`. This indicates that the key event was generated by the KBM shortcut remap method using `SendInput`. This ensures that we don't read events generated by the shortcut remap method, but we still read events which are generated by the key remap method.
- Get the name of the process in the foreground. This is done using `GetCurrentApplication` which uses `GetForegroundWindow` to get the window handle and `get_process_path` from the common lib. This approach can fail for UWP apps in full screen, so for that scenario we use the `GetGUIThreadInfo` approach to find the correct window handle, and hence the correct process name. This method is [described in more detail](keyboardmanagercommon.md#Foreground-app-detection) - Get the name of the process in the foreground. This is done using `GetCurrentApplication` which uses `GetForegroundWindow` to get the window handle and `get_process_path` from the common lib. This approach can fail for UWP apps in full screen, so for that scenario we use the `GetGUIThreadInfo` approach to find the correct window handle, and hence the correct process name. This method is [described in more detail](keyboardmanagercommon.md#Foreground-app-detection)
- By checking `KeyboardManagerState.GetActivatedApp` we check if an app-specific shortcut is currently invoked. If so, we consider this application to be the activated app. This is required because some shortcut remaps could cause the current app to lose focus and hence until the shortcut is completely released we should allow that remap to continue, otherwise the user could end up in a state where some keys do not get released. For example: remap <kbd>Ctrl+A</kbd> to <kbd>Alt+Tab</kbd> for Edge, when a user presses <kbd>Ctrl+A</kbd> the window loses focus as <kbd>Alt+Tab</kbd> gets executed. - By checking `KeyboardManagerState.GetActivatedApp` we check if an app-specific shortcut is currently invoked. If so, we consider this application to be the activated app. This is required because some shortcut remaps could cause the current app to lose focus and hence until the shortcut is completely released we should allow that remap to continue; otherwise, the user could end up in a state where some keys do not get released. For example: remap <kbd>Ctrl+A</kbd> to <kbd>Alt+Tab</kbd> for Edge, when a user presses <kbd>Ctrl+A</kbd> the window loses focus as <kbd>Alt+Tab</kbd> gets executed.
- If there is no app-specific shortcut currently invoked, we check if the foreground process is present in the list of app-specific remaps, either with or without the file extension and case-insensitive. If it is, this is considered to be the activated app. - If there is no app-specific shortcut currently invoked, we check if the foreground process is present in the list of app-specific remaps, either with or without the file extension and case-insensitive. If it is, this is considered to be the activated app.
- Call `HandleShortcutRemapEvent` with the `activatedApp` argument so that app-specific shortcut remapping takes place if it applies for the current key event. - Call `HandleShortcutRemapEvent` with the `activatedApp` argument so that app-specific shortcut remapping takes place if it applies for the current key event.
@ -73,8 +73,8 @@ The [`MockedInput`](https://github.com/microsoft/PowerToys/blob/main/src/modules
[To mock the `SendInput` method](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/test/MockedInput.cpp#L10-L110), the steps for processing the input are as follows. This implementation is based on public documentation for SendInput and the behavior of key messages and keyboard hooks: [To mock the `SendInput` method](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/test/MockedInput.cpp#L10-L110), the steps for processing the input are as follows. This implementation is based on public documentation for SendInput and the behavior of key messages and keyboard hooks:
- Iterate over all the inputs in the `INPUT` vector argument. - Iterate over all the inputs in the `INPUT` vector argument.
- If the event is a key up event, then it is considered [`WM_SYSKEYUP`](https://learn.microsoft.com/windows/win32/inputdev/wm-syskeyup) if Alt is held down, otherwise it is `WM_KEYUP`. - If the event is a key up event, then it is considered [`WM_SYSKEYUP`](https://learn.microsoft.com/windows/win32/inputdev/wm-syskeyup) if Alt is held down; otherwise, it is `WM_KEYUP`.
- If the event is a key down event, then it is considered [`WM_SYSKEYDOWN`](https://learn.microsoft.com/windows/win32/inputdev/wm-syskeydown) if either Alt is held down or if it is F10, otherwise it is `WM_KEYDOWN`. - If the event is a key down event, then it is considered [`WM_SYSKEYDOWN`](https://learn.microsoft.com/windows/win32/inputdev/wm-syskeydown) if either Alt is held down or if it is F10; otherwise, it is `WM_KEYDOWN`.
- An optional function which can be set on the `MockedInput` handler can be used to test for the number of times a key event is received by the system with a particular condition using [`sendVirtualInputCallCondition`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/test/MockedInput.cpp#L48-L52). - An optional function which can be set on the `MockedInput` handler can be used to test for the number of times a key event is received by the system with a particular condition using [`sendVirtualInputCallCondition`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/test/MockedInput.cpp#L48-L52).
- The hook logic for a low level hook which returns 0 or 1 can be set on the `MockedInput` handler such that it behaves like a low level hook would behave with actual keyboard input. If the method returns 1, then the keyboard state is not updated, and if it returns 0 the corresponding key event is used to update the key state. This works in the recursive way as well similar to low level hooks, as `SendVirtualInput` can be called from within the hook, thus simulating identical behavior to calling `SendInput` in a low level hook (as soon as SendInput is called, the low level hook is called for the new input event, and only after those are processed it returns back to the current event, check this [blog](https://devblogs.microsoft.com/oldnewthing/20140213-00/?p=1773) for more details). - The hook logic for a low level hook which returns 0 or 1 can be set on the `MockedInput` handler such that it behaves like a low level hook would behave with actual keyboard input. If the method returns 1, then the keyboard state is not updated, and if it returns 0 the corresponding key event is used to update the key state. This works in the recursive way as well similar to low level hooks, as `SendVirtualInput` can be called from within the hook, thus simulating identical behavior to calling `SendInput` in a low level hook (as soon as SendInput is called, the low level hook is called for the new input event, and only after those are processed it returns back to the current event, check this [blog](https://devblogs.microsoft.com/oldnewthing/20140213-00/?p=1773) for more details).
- For updating the keyboard state, KEYUP messages result in the state for that key code being set to false, and KEYDOWN result in the state for that key code being set to true. - For updating the keyboard state, KEYUP messages result in the state for that key code being set to false, and KEYDOWN result in the state for that key code being set to true.

View File

@ -127,12 +127,12 @@ The [`HandleKeyboardHookEvent`](https://github.com/microsoft/PowerToys/blob/b805
**Note:** Single key remaps need to be executed before shortcut remaps, because otherwise there can be several logical issues. For example if a user has Ctrl remapped to X and Ctrl+A remapped to Y, we can't detect Ctrl+A because the moment Ctrl is pressed it would be remapped to X before the system ever sees Ctrl+A. This is why the design decision was made to separate Remap keys and Remap shortcuts, and all key remaps are reflected in the shortcut remaps. **Note:** Single key remaps need to be executed before shortcut remaps, because otherwise there can be several logical issues. For example if a user has Ctrl remapped to X and Ctrl+A remapped to Y, we can't detect Ctrl+A because the moment Ctrl is pressed it would be remapped to X before the system ever sees Ctrl+A. This is why the design decision was made to separate Remap keys and Remap shortcuts, and all key remaps are reflected in the shortcut remaps.
## Custom Action to launch KBM UI ## Custom Action to launch KBM UI
KBM uses the [`call_custom_action`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L249-L280) method from the `PowertoyModuleIface` in order to launch the KBM UI when the user clicks the Remap a key or Remap a shortcut button from the KBM settings page. On clicking the button, we check if there is already any active KBM UI window, and if there is it is brought to the foreground. If not, the corresponding KBM UI window is launched on a separate detached thread. The UI is described in more detail in [Keyboard Manager UI](keyboardmanagerui.md). KBM uses the [`call_custom_action`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L249-L280) method from the `PowertoyModuleIface` in order to launch the KBM UI when the user clicks "Remap a key" or "Remap a shortcut" from the KBM settings page. On clicking the button, we check if there is already any active KBM UI window, and if there is it is brought to the foreground. If not, the corresponding KBM UI window is launched on a separate detached thread. The UI is described in more detail in [Keyboard Manager UI](keyboardmanagerui.md).
## SendInput Special Scenarios ## SendInput Special Scenarios
### Extended keys ### Extended keys
Certain keys such as the arrow keys, <kbd>right Ctrl/Alt</kbd>, and <kbd>Del/Home/Ins</kbd>, etc need to be sent with the `KEYEVENTF_EXTENDEDKEY` flag because otherwise the NumPad versions get sent, which can cause weird behavior when NumLock is on. The code can be found where [`SetKeyEvent` checks `IsExtendedKey(keyCode)`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/common/Helpers.cpp#L190-L194) and the list of extended keys in code can be found in [`IsExtendedKey`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/common/Helpers.cpp#L73-L98). Docs about extended keys can be found in [Keyboard Input Overview: Extended-Key Flag Certain keys such as the arrow keys, <kbd>right Ctrl/Alt</kbd>, and <kbd>Del/Home/Ins</kbd>, etc. need to be sent with the `KEYEVENTF_EXTENDEDKEY` flag because otherwise the NumPad versions get sent, which can cause weird behavior when NumLock is on. The code can be found where [`SetKeyEvent` checks `IsExtendedKey(keyCode)`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/common/Helpers.cpp#L190-L194) and the list of extended keys in code can be found in [`IsExtendedKey`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/common/Helpers.cpp#L73-L98). Docs about extended keys can be found in [Keyboard Input Overview: Extended-Key Flag
](https://learn.microsoft.com/windows/win32/inputdev/about-keyboard-input#extended-key-flag). ](https://learn.microsoft.com/windows/win32/inputdev/about-keyboard-input#extended-key-flag).
The weird behavior that is caused by this can be found at these issues: The weird behavior that is caused by this can be found at these issues:
@ -177,13 +177,13 @@ For example, while [remapping <kbd>Ctrl</kbd> to <kbd>Caps Lock</kbd>](https://g
While the above work around fixes most of the cases, there are still some scenarios where the modifier can get stuck, mentioned at this [comment](https://github.com/microsoft/PowerToys/issues/3397#issuecomment-663729278), which is why the issue is still open. This occurs if a modifier is pressed after the remap has been invoked before releasing the remapped key and it is a harder scenario to solve which requires refactoring the single key remap code. While the above work around fixes most of the cases, there are still some scenarios where the modifier can get stuck, mentioned at this [comment](https://github.com/microsoft/PowerToys/issues/3397#issuecomment-663729278), which is why the issue is still open. This occurs if a modifier is pressed after the remap has been invoked before releasing the remapped key and it is a harder scenario to solve which requires refactoring the single key remap code.
### UIPI Issues (not resolved) ### UIPI Issues (not resolved)
`SendInput` does not work directly with certain key codes such as Play/Pause Media, Calculator key, etc as it requires UAC privileges to be injected to the OS and accordingly play the active media app or launch the Calculator app. In order to resolve this the correct approach is that the executable which calls `SendInput` needs to have the [UIAccess flag](https://learn.microsoft.com/windows/win32/winauto/uiauto-securityoverview) set to true, which will also avoid the requirement of KBM having to run as administrator to intercept key events when an elevated window is in focus. The UIAccess flag has many constraints such as it must be a signed executable and must be located in a protected path like Program Files. Since KBM currently runs out of the runner process, it would make more sense to do this work after KBM is moved to a separate executable, and it could be enabled by a separate toggle in settings only if PowerToys is installed in Program Files. [This comment](https://github.com/microsoft/PowerToys/issues/3192#issuecomment-646323661) has more details on this approach and (this)[https://github.com/microsoft/PowerToys/issues/3255] is the tracking issue. `SendInput` does not work directly with certain key codes such as Play/Pause Media, Calculator key, etc. as it requires UAC privileges to be injected to the OS and accordingly play the active media app or launch the Calculator app. In order to resolve this the correct approach is that the executable which calls `SendInput` needs to have the [UIAccess flag](https://learn.microsoft.com/windows/win32/winauto/uiauto-securityoverview) set to true, which will also avoid the requirement of KBM having to run as administrator to intercept key events when an elevated window is in focus. The UIAccess flag has many constraints such as it must be a signed executable and must be located in a protected path like Program Files. Since KBM currently runs out of the runner process, it would make more sense to do this work after KBM is moved to a separate executable, and it could be enabled by a separate toggle in settings only if PowerToys is installed in Program Files. [This comment](https://github.com/microsoft/PowerToys/issues/3192#issuecomment-646323661) has more details on this approach and (this)[https://github.com/microsoft/PowerToys/issues/3255] is the tracking issue.
## Other remapping approaches ## Other remapping approaches
Other approaches for remapping which were deprioritized are: Other approaches for remapping which were deprioritized are:
### Registry approach ### Registry approach
This method is used by [SharpKeys](https://github.com/randyrants/sharpkeys) and involves using the [Microsoft Keyboard Scancode mapper registry key](https://github.com/randyrants/sharpkeys) to remap keys based on their scan codes. This has the advantage of being applied in all scenarios and not facing any elevation or UAC issues, however the disadvantages are that for modifying the settings the process must run elevated (as it modifies HKLM registry) and it requires a reboot to get applied. Another issue which is an advantage/disadvantage for users is that the process does not need to be running, so the remaps are applied all the time, including at the password prompt on logging into the user's Windows account, which could get a user stuck if they orphaned a key in their password. This registry doesn't have any support for remapping shortcuts either, so the hook approach was prioritized over this. This method is used by [SharpKeys](https://github.com/randyrants/sharpkeys) and involves using the [Microsoft Keyboard Scancode mapper registry key](https://github.com/randyrants/sharpkeys) to remap keys based on their scan codes. This has the advantage of being applied in all scenarios and not facing any elevation or UAC issues, however the disadvantages are that for modifying the settings, the process must run elevated (as it modifies HKLM registry) and it requires a reboot to get applied. Another issue which is an advantage/disadvantage for users is that the process does not need to be running, so the remaps are applied all the time, including at the password prompt on logging into the user's Windows account, which could get a user stuck if they orphaned a key in their password. This registry doesn't have any support for remapping shortcuts either, so the hook approach was prioritized over this.
### Driver approach ### Driver approach
Using a driver approach has the benefit of not depending on precedence orders as KBM could always run before low level hooks, and it also has the benefit of differentiating between different keyboards, allowing [multi keyboard-specific remaps](https://github.com/microsoft/PowerToys/issues/1460). The disadvantages are however that any bug or crash could have system level consequences. [Interception](https://github.com/oblitum/Interception) is an open source driver that could be used for implementing this. The approach was deprioritized due to the potential side effects. Using a driver approach has the benefit of not depending on precedence orders as KBM could always run before low level hooks, and it also has the benefit of differentiating between different keyboards, allowing [multi keyboard-specific remaps](https://github.com/microsoft/PowerToys/issues/1460). The disadvantages are however that any bug or crash could have system level consequences. [Interception](https://github.com/oblitum/Interception) is an open source driver that could be used for implementing this. The approach was deprioritized due to the potential side effects.
@ -191,7 +191,7 @@ Using a driver approach has the benefit of not depending on precedence orders as
## Telemetry ## Telemetry
Keyboard Manager emits the following telemetry events (implemented in [trace.h](https://github.com/microsoft/PowerToys/blob/main/src/modules/keyboardmanager/common/trace.h) and [trace.cpp](https://github.com/microsoft/PowerToys/blob/main/src/modules/keyboardmanager/common/trace.cpp)): Keyboard Manager emits the following telemetry events (implemented in [trace.h](https://github.com/microsoft/PowerToys/blob/main/src/modules/keyboardmanager/common/trace.h) and [trace.cpp](https://github.com/microsoft/PowerToys/blob/main/src/modules/keyboardmanager/common/trace.cpp)):
- **`KeyboardManager_EnableKeyboardManager`:** Logs a `boolean` value storing the KBM toggle state. It is logged whenever KBM is enabled or disabled (emitted in [`enable`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L305-L306) and [`disable`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L315-L316)). - **`KeyboardManager_EnableKeyboardManager`:** Logs a `boolean` value storing the KBM toggle state. It is logged whenever KBM is enabled or disabled (emitted in [`enable`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L305-L306) and [`disable`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L315-L316)).
- **`KeyboardManager_KeyRemapCount`:** Logs the number of key to key and key to shortcut remaps (i.e. all the remaps on the Remap a key window). This gets logged on saving new settings in the Remap a key window (emitted at [the end of `ApplySingleKeyRemappings`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/LoadingAndSavingRemappingHelper.cpp#L159-L163)). - **`KeyboardManager_KeyRemapCount`:** Logs the number of key to key and key to shortcut remaps (i.e. all the remaps on the "Remap a key" window). This gets logged on saving new settings in the "Remap a key" window (emitted at [the end of `ApplySingleKeyRemappings`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/LoadingAndSavingRemappingHelper.cpp#L159-L163)).
- **`KeyboardManager_OSLevelShortcutRemapCount`:** Logs the number of global shortcut to shortcut and shortcut to key remaps. This gets logged on saving new settings in the Remap a shortcut window (emitted at [the end of `ApplyShortcutRemappings`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/LoadingAndSavingRemappingHelper.cpp#L220)). - **`KeyboardManager_OSLevelShortcutRemapCount`:** Logs the number of global shortcut to shortcut and shortcut to key remaps. This gets logged on saving new settings in the "Remap a shortcut" window (emitted at [the end of `ApplyShortcutRemappings`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/LoadingAndSavingRemappingHelper.cpp#L220)).
- **`KeyboardManager_AppSpecificShortcutRemapCount`:** Logs the number of app-specific shortcut to shortcut and shortcut to key remaps. This gets logged on saving new settings in the Remap a shortcut window (emitted [after calling `OSLevelShortcutRemapCount` in `ApplyShortcutRemappings`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/LoadingAndSavingRemappingHelper.cpp#L221)). - **`KeyboardManager_AppSpecificShortcutRemapCount`:** Logs the number of app-specific shortcut to shortcut and shortcut to key remaps. This gets logged on saving new settings in the "Remap a shortcut" window (emitted [after calling `OSLevelShortcutRemapCount` in `ApplyShortcutRemappings`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/LoadingAndSavingRemappingHelper.cpp#L221)).
- **`KeyboardManager_Error`:** Logs the occurrence of an error in KBM with the name of the method, error code and the corresponding error message. This is currently used only for logging `SetWindowsHookEx` failures (emitted [at the end of `start_lowlevel_keyboard_hook`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L364-L369)). - **`KeyboardManager_Error`:** Logs the occurrence of an error in KBM with the name of the method, error code and the corresponding error message. This is currently used only for logging `SetWindowsHookEx` failures (emitted [at the end of `start_lowlevel_keyboard_hook`](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/dll/dllmain.cpp#L364-L369)).

View File

@ -32,7 +32,7 @@ The KBM UI consists of a [`Grid` with several columns](https://github.com/micros
When the UI windows are activated the `KeyboardManagerState` object [sets the `UIState` variable](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp#L251-L252) which is used for distinguishing if the UI is up from the keyboard hook thread. The [states are also updated](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp#L53) on opening and closing the Type window. When the UI windows are activated the `KeyboardManagerState` object [sets the `UIState` variable](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp#L251-L252) which is used for distinguishing if the UI is up from the keyboard hook thread. The [states are also updated](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp#L53) on opening and closing the Type window.
Clicking the Type Button [opens a content dialog](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp#L206-L380) which registers key delays using the [`KeyDelay` class](keyboardmanagercommon.md#KeyDelay) for Enter and Esc keys and sets the UI states such that when a key event occurs the TextBlocks on the ContentDialog are updated accordingly. On accepting the dialog the selected keys are copied into the ComboBoxes from the TextBlocks, and on closing the window the key delays are unregistered and UI states are reset. Clicking the Type Button [opens a content dialog](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp#L206-L380) which registers key delays using the [`KeyDelay` class](keyboardmanagercommon.md#KeyDelay) for Enter and Esc keys and sets the UI states such that when a key event occurs the TextBlocks on the ContentDialog are updated accordingly. On accepting the dialog, the selected keys are copied into the ComboBoxes from the TextBlocks, and on closing the window, the key delays are unregistered and UI states are reset.
Since ComboBoxes are added dynamically, handlers have been added which [update the accessible names for these controls](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/KeyDropDownControl.cpp#L69-L74), which get executed whenever a drop down is added or removed. Since ComboBoxes are added dynamically, handlers have been added which [update the accessible names for these controls](https://github.com/microsoft/PowerToys/blob/b80578b1b9a4b24c9945bddac33c771204280107/src/modules/keyboardmanager/ui/KeyDropDownControl.cpp#L69-L74), which get executed whenever a drop down is added or removed.

View File

@ -38,7 +38,7 @@ The Value Generator plugin is used to generate hashes for strings, to calculate
- [`UuidCreateSequential`](https://learn.microsoft.com/en-us/windows/win32/api/rpcdce/nf-rpcdce-uuidcreatesequential) for version 1 - [`UuidCreateSequential`](https://learn.microsoft.com/en-us/windows/win32/api/rpcdce/nf-rpcdce-uuidcreatesequential) for version 1
- `System.Guid.NewGuid()` for version 4 - `System.Guid.NewGuid()` for version 4
- `System.Guid.CreateVersion7()` for version 7 - `System.Guid.CreateVersion7()` for version 7
- Versions 3 and 5 take two parameters, a namespace and a name - Versions 3 and 5 take two parameters: a namespace and a name
- The namespace must be a valid GUID or one of the [predefined ones](https://datatracker.ietf.org/doc/html/rfc4122#appendix-C) - The namespace must be a valid GUID or one of the [predefined ones](https://datatracker.ietf.org/doc/html/rfc4122#appendix-C)
- The `PredefinedNamespaces` dictionary contains aliases for the predefined namespaces - The `PredefinedNamespaces` dictionary contains aliases for the predefined namespaces
- The name can be any string - The name can be any string
@ -72,10 +72,10 @@ The Value Generator plugin is used to generate hashes for strings, to calculate
### [`InputParser`](/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/InputParser.cs) ### [`InputParser`](/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/InputParser.cs)
- It is responsible only for parsing the query from the user - It is responsible only for parsing the query from the user
- Based on the user query, the `ParseInput()` method must return an object that implements the `IComputeRequest` interface or it must throw one of `FormatException` or `ArgumentException` - Based on the user query, the `ParseInput()` method must return an object that implements the `IComputeRequest` interface or it must throw one of `FormatException` or `ArgumentException`
- Throwing an `ArgumentException` should signal the fact the query contains a mistake that the user can fix (eg. an unsupported hash function, an invalid GUID version, an invalid namespace, etc) - Throwing an `ArgumentException` should signal the fact that the query contains a mistake that the user can fix (e.g. an unsupported hash function, an invalid GUID version, an invalid namespace, etc.)
> The error message will be shown to the user and no log message will be created > The error message will be shown to the user and no log message will be created
- Throwing a `FormatException` should signal either: - Throwing a `FormatException` should signal either:
- that the query may become valid, and so it does not make sense to show an error just yet (eg. the query does not contain a request yet, a hash request without a string to hash) - that the query may become valid, and so it does not make sense to show an error just yet (e.g. the query does not contain a request yet, a hash request without a string to hash)
- that the query is completely invalid - that the query is completely invalid
> The error message will not be shown to the user but a log message will be created > The error message will not be shown to the user but a log message will be created

View File

@ -6,7 +6,7 @@ The History Plugin allows users to search or display results they have used (sel
The plugin uses data that was already being captured which is, what results were clicked, and how many times. We do add a little more data to this set now. The plugin uses data that was already being captured which is, what results were clicked, and how many times. We do add a little more data to this set now.
When this plugin is queried, it creates results based on this previously selected results data. When this plugin is queried, it creates results based on this previously selected results data.
In order to make sure selected results in the history are still valid, we re-query the plugin the relevant plug using the PluginManager. If there are no results, In order to make sure selected results in the history are still valid, we re-query the relevant plugin using the PluginManager. If there are no results,
this history item is not included. This usually means that the result is no longer valid. For instance, if a file was deleted, but it's still in the selected history this history item is not included. This usually means that the result is no longer valid. For instance, if a file was deleted, but it's still in the selected history
we don't want to show it as a selectable result. we don't want to show it as a selectable result.

View File

@ -9,7 +9,7 @@ The code itself is very simple, basically just a call into OneNote interop via t
var pages = OneNoteProvider.FindPages(query.Search); var pages = OneNoteProvider.FindPages(query.Search);
``` ```
The query results will be cached for 1 day, and if cached results are found they'll be returned in the initial `Query()` call, otherwise OneNote itself will be queried in the `delayedExecution:true` overload. The query results will be cached for 1 day, and if cached results are found they'll be returned in the initial `Query()` call; otherwise, OneNote itself will be queried in the `delayedExecution:true` overload.
If the user actions on a result, it'll open it in the OneNote app, and restore and/or focus the app as well if necessary. If the user actions on a result, it'll open it in the OneNote app, and restore and/or focus the app as well if necessary.

View File

@ -8,7 +8,7 @@ The user can switch to the found windows, close them or kill their process.
## Remarks ## Remarks
### UWP Apps ### UWP Apps
- The process of an UWP app can't be detected correctly for windows that are minimized while searching. At this time they are assigned to the generic process `ApplicationFrameHost.exe`. If the user searches for such an window while it is not minimized, then the process gets assigned correctly/updated. - The process of an UWP app can't be detected correctly for windows that are minimized while searching. At this time they are assigned to the generic process `ApplicationFrameHost.exe`. If the user searches for such a window while it is not minimized, then the process gets assigned correctly/updated.
### Killing processes ### Killing processes
- Killing the Explorer process is only allowed, if each folder window is running in its own process. (See section `File Explorer setting` below.) - Killing the Explorer process is only allowed, if each folder window is running in its own process. (See section `File Explorer setting` below.)
@ -17,7 +17,7 @@ The user can switch to the found windows, close them or kill their process.
- Windows of UWP apps don't know their process, until they are searched in non-minimized state. - Windows of UWP apps don't know their process, until they are searched in non-minimized state.
### File Explorer setting ### File Explorer setting
- To kill the Process of an Explorer window, each window has to run in a separate process. Otherwise the process is the same one as the shell process and killing the shell process will crash the shell (Windows ui). - To kill the Process of an Explorer window, each window has to run in a separate process. Otherwise, the process is the same one as the shell process and killing the shell process will crash the shell (Windows ui).
- To enable this behavior the setting `Launch folder windows in a separate process` under `Folder Options > View` has to be enabled. - To enable this behavior the setting `Launch folder windows in a separate process` under `Folder Options > View` has to be enabled.
- From PowerToys Run you can open the `Folder options` dialog by clicking the information message in the search results. The information message is only shown when searching with action keyword for explorer windows and can be hidden in the plugin settings. - From PowerToys Run you can open the `Folder options` dialog by clicking the information message in the search results. The information message is only shown when searching with action keyword for explorer windows and can be hidden in the plugin settings.
- Note: The folder option/process is evaluated in real time. After changing the setting it is enough to search again for the windows. - Note: The folder option/process is evaluated in real time. After changing the setting it is enough to search again for the windows.

View File

@ -129,7 +129,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="by">The name of the element.</param> /// <param name="by">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne<T>(By by, int timeoutMS = 5000, bool global = false) public bool HasOne<T>(By by, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -141,7 +141,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="by">The name of the element.</param> /// <param name="by">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne(By by, int timeoutMS = 5000, bool global = false) public bool HasOne(By by, int timeoutMS = 5000, bool global = false)
{ {
return this.HasOne<Element>(by, timeoutMS, global); return this.HasOne<Element>(by, timeoutMS, global);
@ -153,7 +153,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne<T>(string name, int timeoutMS = 5000, bool global = false) public bool HasOne<T>(string name, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -165,7 +165,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne(string name, int timeoutMS = 5000, bool global = false) public bool HasOne(string name, int timeoutMS = 5000, bool global = false)
{ {
return this.HasOne<Element>(By.Name(name), timeoutMS, global); return this.HasOne<Element>(By.Name(name), timeoutMS, global);
@ -177,7 +177,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="by">The selector to find the element.</param> /// <param name="by">The selector to find the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has<T>(By by, int timeoutMS = 5000, bool global = false) public bool Has<T>(By by, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -189,7 +189,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="by">The selector to find the element.</param> /// <param name="by">The selector to find the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has(By by, int timeoutMS = 5000, bool global = false) public bool Has(By by, int timeoutMS = 5000, bool global = false)
{ {
return this.Has<Element>(by, timeoutMS, global); return this.Has<Element>(by, timeoutMS, global);
@ -201,7 +201,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has<T>(string name, int timeoutMS = 5000, bool global = false) public bool Has<T>(string name, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -213,7 +213,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has(string name, int timeoutMS = 5000, bool global = false) public bool Has(string name, int timeoutMS = 5000, bool global = false)
{ {
return this.Has<Element>(name, timeoutMS, global); return this.Has<Element>(name, timeoutMS, global);

View File

@ -154,7 +154,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="by">The name of the element.</param> /// <param name="by">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne<T>(By by, int timeoutMS = 5000, bool global = false) public bool HasOne<T>(By by, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -166,7 +166,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="by">The name of the element.</param> /// <param name="by">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne(By by, int timeoutMS = 5000, bool global = false) public bool HasOne(By by, int timeoutMS = 5000, bool global = false)
{ {
return this.Session.HasOne<Element>(by, timeoutMS, global); return this.Session.HasOne<Element>(by, timeoutMS, global);
@ -178,7 +178,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne<T>(string name, int timeoutMS = 5000, bool global = false) public bool HasOne<T>(string name, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -190,7 +190,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if only has one element, otherwise false.</returns> /// <returns>True if only has one element; otherwise, false.</returns>
public bool HasOne(string name, int timeoutMS = 5000, bool global = false) public bool HasOne(string name, int timeoutMS = 5000, bool global = false)
{ {
return this.Session.HasOne<Element>(name, timeoutMS, global); return this.Session.HasOne<Element>(name, timeoutMS, global);
@ -202,7 +202,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="by">The selector to find the element.</param> /// <param name="by">The selector to find the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has<T>(By by, int timeoutMS = 5000, bool global = false) public bool Has<T>(By by, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -214,7 +214,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="by">The selector to find the element.</param> /// <param name="by">The selector to find the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has(By by, int timeoutMS = 5000, bool global = false) public bool Has(By by, int timeoutMS = 5000, bool global = false)
{ {
return this.Session.Has<Element>(by, timeoutMS, global); return this.Session.Has<Element>(by, timeoutMS, global);
@ -226,7 +226,7 @@ namespace Microsoft.PowerToys.UITest
/// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam> /// <typeparam name="T">The class of the element, should be Element or its derived class.</typeparam>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has<T>(string name, int timeoutMS = 5000, bool global = false) public bool Has<T>(string name, int timeoutMS = 5000, bool global = false)
where T : Element, new() where T : Element, new()
{ {
@ -238,7 +238,7 @@ namespace Microsoft.PowerToys.UITest
/// </summary> /// </summary>
/// <param name="name">The name of the element.</param> /// <param name="name">The name of the element.</param>
/// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param> /// <param name="timeoutMS">The timeout in milliseconds (default is 5000).</param>
/// <returns>True if has one or more element, otherwise false.</returns> /// <returns>True if has one or more element; otherwise, false.</returns>
public bool Has(string name, int timeoutMS = 5000, bool global = false) public bool Has(string name, int timeoutMS = 5000, bool global = false)
{ {
return this.Session.Has<Element>(name, timeoutMS, global); return this.Session.Has<Element>(name, timeoutMS, global);

View File

@ -24,7 +24,7 @@ namespace Microsoft.PowerToys.UITest
/// <param name="c1">base color</param> /// <param name="c1">base color</param>
/// <param name="c2">test color</param> /// <param name="c2">test color</param>
/// <param name="fuzz">fuzz factor, default is 10</param> /// <param name="fuzz">fuzz factor, default is 10</param>
/// <returns>true if same, otherwise is false</returns> /// <returns>true if same; otherwise, is false</returns>
public static bool PixIsSame(Color c1, Color c2, int fuzz = 10) public static bool PixIsSame(Color c1, Color c2, int fuzz = 10)
{ {
return Math.Abs(c1.A - c2.A) <= fuzz && Math.Abs(c1.R - c2.R) <= fuzz && Math.Abs(c1.G - c2.G) <= fuzz && Math.Abs(c1.B - c2.B) <= fuzz; return Math.Abs(c1.A - c2.A) <= fuzz && Math.Abs(c1.R - c2.R) <= fuzz && Math.Abs(c1.G - c2.G) <= fuzz && Math.Abs(c1.B - c2.B) <= fuzz;

View File

@ -83,7 +83,7 @@ namespace winrt::PowerToys::Interop::implementation
ev.key = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->vkCode; ev.key = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->vkCode;
ev.dwExtraInfo = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->dwExtraInfo; ev.dwExtraInfo = reinterpret_cast<KBDLLHOOKSTRUCT*>(lParam)->dwExtraInfo;
// Ignore the keyboard hook if the FilterkeyboardEvent returns false. // Ignore the keyboard hook if the FilterKeyboardEvent returns false.
if ((s_instance->filterKeyboardEvent != nullptr && !s_instance->filterKeyboardEvent(ev))) if ((s_instance->filterKeyboardEvent != nullptr && !s_instance->filterKeyboardEvent(ev)))
{ {
continue; continue;

View File

@ -12,7 +12,7 @@ namespace winrt::PowerToys::Interop::implementation
{ {
return _map->GetKeyFromName(std::wstring(name)); return _map->GetKeyFromName(std::wstring(name));
} }
void LayoutMapManaged::Updatelayout() void LayoutMapManaged::UpdateLayout()
{ {
_map->UpdateLayout(); _map->UpdateLayout();
} }

View File

@ -10,7 +10,7 @@ namespace winrt::PowerToys::Interop::implementation
hstring GetKeyName(uint32_t key); hstring GetKeyName(uint32_t key);
uint32_t GetKeyValue(hstring const& name); uint32_t GetKeyValue(hstring const& name);
void Updatelayout(); void UpdateLayout();
private: private:
std::unique_ptr<LayoutMap> _map = std::make_unique<LayoutMap>(); std::unique_ptr<LayoutMap> _map = std::make_unique<LayoutMap>();

View File

@ -6,7 +6,7 @@ namespace PowerToys
LayoutMapManaged(); LayoutMapManaged();
String GetKeyName(UInt32 key); String GetKeyName(UInt32 key);
UInt32 GetKeyValue(String name); UInt32 GetKeyValue(String name);
void Updatelayout(); void UpdateLayout();
} }
} }
} }

View File

@ -117,7 +117,7 @@ void LayoutMap::LayoutMapImpl::UpdateLayout()
} }
} }
// Override special key names like Shift, Ctrl etc because they don't have unicode mappings and key names like Enter, Space as they appear as "\r", " " // Override special key names like Shift, Ctrl, etc. because they don't have unicode mappings and key names like Enter, Space as they appear as "\r", " "
// To do: localization // To do: localization
keyboardLayoutMap[VK_CANCEL] = L"Break"; keyboardLayoutMap[VK_CANCEL] = L"Break";
keyboardLayoutMap[VK_BACK] = L"Backspace"; keyboardLayoutMap[VK_BACK] = L"Backspace";

View File

@ -190,7 +190,7 @@ void notifications::show_toast_with_activations(std::wstring message,
// We must set toast's title and contents immediately, because some of the toasts we send could be snoozed. // We must set toast's title and contents immediately, because some of the toasts we send could be snoozed.
// Windows instantiates the snoozed toast from scratch before showing it again, so all bindings that were set // Windows instantiates the snoozed toast from scratch before showing it again, so all bindings that were set
// using NotificationData would be empty. // using NotificationData would be empty.
// Add the launch attribute if launch_uri is provided, otherwise omit it // Add the launch attribute if launch_uri is provided; otherwise, omit it
toast_xml += LR"(<?xml version="1.0"?>)"; toast_xml += LR"(<?xml version="1.0"?>)";
if (!launch_uri.empty()) if (!launch_uri.empty())
{ {

View File

@ -207,7 +207,7 @@ namespace powertoys_gpo
inline std::optional<std::wstring> getPolicyListValue(const std::wstring& registry_list_path, const std::wstring& registry_list_value_name) inline std::optional<std::wstring> getPolicyListValue(const std::wstring& registry_list_path, const std::wstring& registry_list_value_name)
{ {
// This function returns the value of an entry of an policy list. The user scope is only checked, if the list is not enabled for the machine to not mix the lists. // This function returns the value of an entry of a policy list. The user scope is only checked, if the list is not enabled for the machine to not mix the lists.
HKEY key{}; HKEY key{};

View File

@ -28,7 +28,7 @@ namespace AdvancedPaste.UnitTests.ServicesTests;
/// Tests that write batch AI outputs against a list of inputs. Connects to OpenAI and uses the full AdvancedPaste action catalog for Semantic Kernel. /// Tests that write batch AI outputs against a list of inputs. Connects to OpenAI and uses the full AdvancedPaste action catalog for Semantic Kernel.
/// If queries produce errors, the error message is written to the output file. If queries produce text-file output, their contents are included as though they were text output. /// If queries produce errors, the error message is written to the output file. If queries produce text-file output, their contents are included as though they were text output.
/// To run this test-suite, first: /// To run this test-suite, first:
/// 1. Setup an OpenAI API key using AdvancedPaste Settings. /// 1. Set up an OpenAI API key using AdvancedPaste Settings.
/// 2. Comment out the [Ignore] attribute above. /// 2. Comment out the [Ignore] attribute above.
/// 3. Ensure the %USERPROFILE% folder contains the required input files (paths are below). /// 3. Ensure the %USERPROFILE% folder contains the required input files (paths are below).
/// These tests are idempotent and resumable, allowing for partial runs and restarts. It's ok to use existing output files as input files - output-related fields will simply be ignored. /// These tests are idempotent and resumable, allowing for partial runs and restarts. It's ok to use existing output files as input files - output-related fields will simply be ignored.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Application <Application
x:Class="AdvancedPaste.App" x:Class="AdvancedPaste.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

View File

@ -1,4 +1,4 @@
<XamlCompositionBrushBase <XamlCompositionBrushBase
x:Class="AdvancedPaste.Controls.AnimatedBorderBrush" x:Class="AdvancedPaste.Controls.AnimatedBorderBrush"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

View File

@ -1,4 +1,4 @@
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animations="using:CommunityToolkit.WinUI.Animations" xmlns:animations="using:CommunityToolkit.WinUI.Animations"

View File

@ -1,4 +1,4 @@
<Page <Page
x:Class="AdvancedPaste.Pages.MainPage" x:Class="AdvancedPaste.Pages.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

View File

@ -1,4 +1,4 @@
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AdvancedPaste"> xmlns:local="using:AdvancedPaste">

View File

@ -17,7 +17,7 @@ public sealed class PasteActionModeratedException : PasteActionException
} }
/// <summary> /// <summary>
/// Non-localized error description for logs, reports, telemetry etc. /// Non-localized error description for logs, reports, telemetry, etc.
/// </summary> /// </summary>
public const string ErrorDescription = "Paste operation moderated"; public const string ErrorDescription = "Paste operation moderated";
} }

View File

@ -60,7 +60,7 @@ OverlayWindow::OverlayWindow(
m_crosshairCursor.reset(winrt::check_pointer(LoadCursorW(nullptr, IDC_CROSS))); m_crosshairCursor.reset(winrt::check_pointer(LoadCursorW(nullptr, IDC_CROSS)));
m_cursorType = CursorType::Standard; m_cursorType = CursorType::Standard;
// Setup the visual tree // Set up the visual tree
m_compositor = compositor; m_compositor = compositor;
m_target = CreateWindowTarget(m_compositor); m_target = CreateWindowTarget(m_compositor);
m_rootVisual = m_compositor.CreateContainerVisual(); m_rootVisual = m_compositor.CreateContainerVisual();

View File

@ -147,7 +147,7 @@ void ThumbnailCropAndLockWindow::CropAndLock(HWND windowToCrop, RECT cropRect)
auto adjustedHeight = windowRect.bottom - windowRect.top; auto adjustedHeight = windowRect.bottom - windowRect.top;
winrt::check_bool(SetWindowPos(m_window, HWND_TOPMOST, 0, 0, adjustedWidth, adjustedHeight, SWP_NOMOVE | SWP_SHOWWINDOW)); winrt::check_bool(SetWindowPos(m_window, HWND_TOPMOST, 0, 0, adjustedWidth, adjustedHeight, SWP_NOMOVE | SWP_SHOWWINDOW));
// Setup the thumbnail // Set up the thumbnail
winrt::check_hresult(DwmRegisterThumbnail(m_window, m_currentTarget, m_thumbnail.addressof())); winrt::check_hresult(DwmRegisterThumbnail(m_window, m_currentTarget, m_thumbnail.addressof()));
clientRect = {}; clientRect = {};

View File

@ -14,7 +14,7 @@ namespace constants::nonlocalizable
// String key used by PowerToys // String key used by PowerToys
constexpr WCHAR PowerToyKey[] = L"File Locksmith"; constexpr WCHAR PowerToyKey[] = L"File Locksmith";
// Nonlocalized name of this PowerToy, for logs, etc // Nonlocalized name of this PowerToy, for logs, etc.
constexpr WCHAR PowerToyName[] = L"File Locksmith"; constexpr WCHAR PowerToyName[] = L"File Locksmith";
// JSON key used to store whether the module is enabled // JSON key used to store whether the module is enabled

View File

@ -141,7 +141,7 @@ namespace PowerToys.FileLocksmithUI.ViewModels
catch (Exception ex) catch (Exception ex)
{ {
Logger.LogError($"Couldn't add a waiter to wait for a process to exit. PID = {process.pid} and Name = {process.name}.", ex); Logger.LogError($"Couldn't add a waiter to wait for a process to exit. PID = {process.pid} and Name = {process.name}.", ex);
Processes.Remove(process); // If we couldn't get an handle to the process or it has exited in the meanwhile, don't show it. Processes.Remove(process); // If we couldn't get a handle to the process or it has exited in the meanwhile, don't show it.
} }
} }
@ -162,8 +162,8 @@ namespace PowerToys.FileLocksmithUI.ViewModels
} }
catch (Exception ex) catch (Exception ex)
{ {
Logger.LogError($"Couldn't get an handle to kill process {selectedProcess.name} with PID {selectedProcess.pid}. Likely has been killed already.", ex); Logger.LogError($"Couldn't get a handle to kill process {selectedProcess.name} with PID {selectedProcess.pid}. Likely has been killed already.", ex);
Processes.Remove(selectedProcess); // If we couldn't get an handle to the process, remove it from the list, since it's likely been killed already. Processes.Remove(selectedProcess); // If we couldn't get a handle to the process, remove it from the list, since it's likely been killed already.
} }
} }

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Application <Application
x:Class="Hosts.App" x:Class="Hosts.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

View File

@ -427,7 +427,7 @@ void SuperSonar<D>::DetectShake()
return; return;
} }
// Size of the rectangle the pointer moved in. // Size of the rectangle that the pointer moved in.
double rectangleWidth = static_cast<double>(maxX) - minX; double rectangleWidth = static_cast<double>(maxX) - minX;
double rectangleHeight = static_cast<double>(maxY) - minY; double rectangleHeight = static_cast<double>(maxY) - minY;
@ -521,7 +521,7 @@ void SuperSonar<D>::StartSonar()
Logger::info("Focusing the sonar on the mouse cursor."); Logger::info("Focusing the sonar on the mouse cursor.");
Trace::MousePointerFocused(); Trace::MousePointerFocused();
// Cover the entire virtual screen. // Cover the entire virtual screen.
// HACK: Draw with 1 pixel off. Otherwise Windows glitches the task bar transparency when a transparent window fill the whole screen. // HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0); SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);
m_sonarPos = ptNowhere; m_sonarPos = ptNowhere;
OnMouseTimer(); OnMouseTimer();

View File

@ -185,7 +185,7 @@ void Highlighter::AddDrawingPoint(MouseButton button)
// Perhaps add a task to the Dispatcher every X circles to clean up. // Perhaps add a task to the Dispatcher every X circles to clean up.
// Get back on top in case other Window is now the topmost. // Get back on top in case other Window is now the topmost.
// HACK: Draw with 1 pixel off. Otherwise Windows glitches the task bar transparency when a transparent window fill the whole screen. // HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0); SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);
} }
@ -402,7 +402,7 @@ void Highlighter::StartDrawing()
m_visible = true; m_visible = true;
// HACK: Draw with 1 pixel off. Otherwise Windows glitches the task bar transparency when a transparent window fill the whole screen. // HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0); SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);
ClearDrawing(); ClearDrawing();
ShowWindow(m_hwnd, SW_SHOWNOACTIVATE); ShowWindow(m_hwnd, SW_SHOWNOACTIVATE);
@ -461,7 +461,7 @@ void Highlighter::ApplySettings(MouseHighlighterSettings settings)
void Highlighter::BringToFront() void Highlighter::BringToFront()
{ {
// HACK: Draw with 1 pixel off. Otherwise Windows glitches the task bar transparency when a transparent window fill the whole screen. // HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0); SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);
} }

View File

@ -60,7 +60,7 @@ public static class LayoutHelperTests
yield return new object[] { new TestCase(layoutConfig, layoutInfo) }; yield return new object[] { new TestCase(layoutConfig, layoutInfo) };
// check we handle rounding errors in scaling the preview form // check we handle rounding errors in scaling the preview form
// that might make the form a pixel *smaller* than the current screen - // that might make the form one pixel *smaller* than the current screen -
// e.g. a desktop 7168 x 1440 scaled to a screen 1024 x 768 // e.g. a desktop 7168 x 1440 scaled to a screen 1024 x 768
// with a 5px form padding border: // with a 5px form padding border:
// //

View File

@ -72,7 +72,7 @@ public static class MouseHelper
// | (a) | | // | (a) | |
// +---------+----------------+ // +---------+----------------+
// //
// setting the position a second time seems to fix this and moves the // setting the position again seems to fix this and moves the
// cursor to the expected location (b) // cursor to the expected location (b)
var target = location.ToPoint(); var target = location.ToPoint();
for (var i = 0; i < 2; i++) for (var i = 0; i < 2; i++)

View File

@ -10,7 +10,7 @@ public interface IImageRegionCopyService
{ {
/// <summary> /// <summary>
/// Copies the source region from the provider's source image (e.g. the interactive desktop, /// Copies the source region from the provider's source image (e.g. the interactive desktop,
/// a static image, etc) to the target region on the specified Graphics object. /// a static image, etc.) to the target region on the specified Graphics object.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Implementations of this interface are used to capture regions of the interactive desktop /// Implementations of this interface are used to capture regions of the interactive desktop

View File

@ -217,7 +217,7 @@ internal sealed partial class MainForm : Form
this.Thumbnail.Image = null; this.Thumbnail.Image = null;
tmp.Dispose(); tmp.Dispose();
// force preview image memory to be released, otherwise // force preview image memory to be released; otherwise,
// all the disposed images can pile up without being GC'ed // all the disposed images can pile up without being GC'ed
GC.Collect(); GC.Collect();
} }
@ -250,7 +250,7 @@ internal sealed partial class MainForm : Form
if (!this.Visible) if (!this.Visible)
{ {
// we seem to need to turn off topmost and then re-enable it again // we seem to need to turn off topmost and then re-enable it again
// when we show the form, otherwise it doesn't always get shown topmost... // when we show the form; otherwise, it doesn't always get shown topmost...
this.TopMost = false; this.TopMost = false;
this.TopMost = true; this.TopMost = true;
this.Show(); this.Show();

View File

@ -181,7 +181,7 @@ void InclusiveCrosshairs::UpdateCrosshairsPosition()
{ {
POINT ptCursor; POINT ptCursor;
// HACK: Draw with 1 pixel off. Otherwise Windows glitches the task bar transparency when a transparent window fill the whole screen. // HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0); SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);
GetCursorPos(&ptCursor); GetCursorPos(&ptCursor);

View File

@ -117,8 +117,8 @@ namespace MouseUtils.UITests
VerifyMouseHighlighterNotAppears(ref settings, "leftClick"); VerifyMouseHighlighterNotAppears(ref settings, "leftClick");
VerifyMouseHighlighterNotAppears(ref settings, "rightClick"); VerifyMouseHighlighterNotAppears(ref settings, "rightClick");
// [Test Case] With left mouse button pressed, drag the mouse and verify the hightlight is dragged with the pointer. // [Test Case] With left mouse button pressed, drag the mouse and verify the highlight is dragged with the pointer.
// [Test Case] With right mouse button pressed, drag the mouse and verify the hightlight is dragged with the pointer. // [Test Case] With right mouse button pressed, drag the mouse and verify the highlight is dragged with the pointer.
foundCustom.Find<ToggleSwitch>("Enable Mouse Highlighter").Toggle(true); foundCustom.Find<ToggleSwitch>("Enable Mouse Highlighter").Toggle(true);
xy = Session.GetMousePosition(); xy = Session.GetMousePosition();
Session.MoveMouseTo(xy.Item1 - 100, xy.Item2); Session.MoveMouseTo(xy.Item1 - 100, xy.Item2);

View File

@ -25,9 +25,9 @@ Find My Mouse:
Mouse Highlighter: Mouse Highlighter:
* Enable Mouse Highlighter. Then: * Enable Mouse Highlighter. Then:
- [x] Press the activation shortcut and press left and right click somewhere, verifying the hightlights are applied. - [x] Press the activation shortcut and press left and right click somewhere, verifying the highlights are applied.
- [x] With left mouse button pressed, drag the mouse and verify the hightlight is dragged with the pointer. - [x] With left mouse button pressed, drag the mouse and verify the highlight is dragged with the pointer.
- [x] With right mouse button pressed, drag the mouse and verify the hightlight is dragged with the pointer. - [x] With right mouse button pressed, drag the mouse and verify the highlight is dragged with the pointer.
- [x] Press the activation shortcut again and verify no highlights appear when the mouse buttons are clicked. - [x] Press the activation shortcut again and verify no highlights appear when the mouse buttons are clicked.
- [x] Disable Mouse Highlighter and verify that the module is not activated when you press the activation shortcut. - [x] Disable Mouse Highlighter and verify that the module is not activated when you press the activation shortcut.
* Test the different settings and verify they apply: * Test the different settings and verify they apply:

View File

@ -970,7 +970,7 @@ namespace MouseWithoutBorders.Class
/// <summary> /// <summary>
/// Use this method to figure out if your code is running on a Microsoft computer. /// Use this method to figure out if your code is running on a Microsoft computer.
/// </summary> /// </summary>
/// <returns>True if running on a Microsoft computer, otherwise false.</returns> /// <returns>True if running on a Microsoft computer; otherwise, false.</returns>
internal static bool IsRunningAtMicrosoft() internal static bool IsRunningAtMicrosoft()
{ {
string domain = GetDNSDomain(); string domain = GetDNSDomain();

View File

@ -27,7 +27,7 @@ namespace MouseWithoutBorders.Core;
* *
* SEQUENCE OF EVENTS: * SEQUENCE OF EVENTS:
* DragDropStep01: MachineX: Remember mouse down state since it could be a start of a dragging * DragDropStep01: MachineX: Remember mouse down state since it could be a start of a dragging
* DragDropStep02: MachineY: Send an message to the MachineX to ask it to check if it is * DragDropStep02: MachineY: Send a message to the MachineX to ask it to check if it is
* doing drag/drop * doing drag/drop
* DragDropStep03: MachineX: Got explorerDragDrop, send WM_CHECK_EXPLORER_DRAG_DROP to its mainForm * DragDropStep03: MachineX: Got explorerDragDrop, send WM_CHECK_EXPLORER_DRAG_DROP to its mainForm
* DragDropStep04: MachineX: Show Mouse Without Borders Helper form at mouse cursor to get DragEnter event. * DragDropStep04: MachineX: Show Mouse Without Borders Helper form at mouse cursor to get DragEnter event.

View File

@ -50,7 +50,7 @@ public static class LoggerTests
var lines = log.Split("\r\n"); var lines = log.Split("\r\n");
// some parts of the PrivateDump output are impossible to reproduce - // some parts of the PrivateDump output are impossible to reproduce -
// e.g. random numbers, system timestamps, thread ids, etc, so we'll mask them // e.g. random numbers, system timestamps, thread ids, etc., so we'll mask them
var maskPrefixes = new string[] var maskPrefixes = new string[]
{ {
"----_s0 = ", "----_s0 = ",

View File

@ -808,7 +808,7 @@ void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_device_context)
d2d_device_context->FillRectangle(monitor_rect, brush.get()); d2d_device_context->FillRectangle(monitor_rect, brush.get());
} }
} }
// Finalize the overlay - dimm the buttons if no thumbnail is present and show "No active window" // Finalize the overlay - dim the buttons if no thumbnail is present and show "No active window"
use_overlay->toggle_window_group(miniature_shown || window_state == MINIMIZED); use_overlay->toggle_window_group(miniature_shown || window_state == MINIMIZED);
if (!miniature_shown && window_state != MINIMIZED) if (!miniature_shown && window_state != MINIMIZED)
{ {

View File

@ -33,7 +33,7 @@ namespace WorkspacesEditor.Telemetry
// Number of apps with "Launch as admin" set // Number of apps with "Launch as admin" set
public int AdminCount { get; set; } public int AdminCount { get; set; }
// True of user checked "Create Shortcut". False if not. // True if user checked "Create Shortcut". False if not.
public bool ShortcutCreated { get; set; } public bool ShortcutCreated { get; set; }
public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage;

View File

@ -1,4 +1,4 @@
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=System.Runtime"> xmlns:system="clr-namespace:System;assembly=System.Runtime">

View File

@ -1,4 +1,4 @@
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=System.Runtime"> xmlns:system="clr-namespace:System;assembly=System.Runtime">

View File

@ -70,6 +70,7 @@ REG_SETTING RegSettings[] = {
{ L"FontScale", SETTING_TYPE_DWORD, 0, &g_FontScale, static_cast<DOUBLE>(g_FontScale) }, { L"FontScale", SETTING_TYPE_DWORD, 0, &g_FontScale, static_cast<DOUBLE>(g_FontScale) },
{ L"ShowExpiredTime", SETTING_TYPE_BOOLEAN, 0, &g_ShowExpiredTime, static_cast<DOUBLE>(g_ShowExpiredTime) }, { L"ShowExpiredTime", SETTING_TYPE_BOOLEAN, 0, &g_ShowExpiredTime, static_cast<DOUBLE>(g_ShowExpiredTime) },
{ L"ShowTrayIcon", SETTING_TYPE_BOOLEAN, 0, &g_ShowTrayIcon, static_cast<DOUBLE>(g_ShowTrayIcon) }, { L"ShowTrayIcon", SETTING_TYPE_BOOLEAN, 0, &g_ShowTrayIcon, static_cast<DOUBLE>(g_ShowTrayIcon) },
// NOTE: AnimateZoom is misspelled, but since it is a user setting stored in the registry we must continue to misspell it.
{ L"AnimnateZoom", SETTING_TYPE_BOOLEAN, 0, &g_AnimateZoom, static_cast<DOUBLE>(g_AnimateZoom) }, { L"AnimnateZoom", SETTING_TYPE_BOOLEAN, 0, &g_AnimateZoom, static_cast<DOUBLE>(g_AnimateZoom) },
{ L"TelescopeZoomOut", SETTING_TYPE_BOOLEAN, 0, &g_TelescopeZoomOut, static_cast<DOUBLE>(g_TelescopeZoomOut) }, { L"TelescopeZoomOut", SETTING_TYPE_BOOLEAN, 0, &g_TelescopeZoomOut, static_cast<DOUBLE>(g_TelescopeZoomOut) },
{ L"SnapToGrid", SETTING_TYPE_BOOLEAN, 0, &g_SnapToGrid, static_cast<DOUBLE>(g_SnapToGrid) }, { L"SnapToGrid", SETTING_TYPE_BOOLEAN, 0, &g_SnapToGrid, static_cast<DOUBLE>(g_SnapToGrid) },

View File

@ -323,7 +323,7 @@ void RestoreForeground()
// If the main window is not visible, move foreground to the next window. // If the main window is not visible, move foreground to the next window.
if( !IsWindowVisible( g_hWndMain ) ) { if( !IsWindowVisible( g_hWndMain ) ) {
// Activate the next window by unhiding and hiding the main window. // Activate the next window by showing and hiding the main window.
MoveWindow( g_hWndMain, 0, 0, 0, 0, FALSE ); MoveWindow( g_hWndMain, 0, 0, 0, 0, FALSE );
ShowWindow( g_hWndMain, SW_SHOWNA ); ShowWindow( g_hWndMain, SW_SHOWNA );
ShowWindow( g_hWndMain, SW_HIDE ); ShowWindow( g_hWndMain, SW_HIDE );
@ -5547,7 +5547,7 @@ LRESULT APIENTRY MainWndProc(
} }
prevPt = currentPt; prevPt = currentPt;
// In liveDraw we an miss the mouse up // In liveDraw we miss the mouse up
if( GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_LAYERED) { if( GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_LAYERED) {
if((GetAsyncKeyState(VK_LBUTTON) & 0x8000) == 0) { if((GetAsyncKeyState(VK_LBUTTON) & 0x8000) == 0) {

View File

@ -84,7 +84,7 @@ public partial class ListViewModel : PageViewModel, IDisposable
protected override void OnFilterUpdated(string filter) protected override void OnFilterUpdated(string filter)
{ {
//// TODO: Just temp testing, need to think about where we want to filter, as ACVS in View could be done, but then grouping need CVS, maybe we do grouping in view //// TODO: Just temp testing, need to think about where we want to filter, as AdvancedCollectionView in View could be done, but then grouping need CollectionViewSource, maybe we do grouping in view
//// and manage filtering below, but we should be smarter about this and understand caching and other requirements... //// and manage filtering below, but we should be smarter about this and understand caching and other requirements...
//// Investigate if we re-use src\modules\cmdpal\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\ListHelpers.cs InPlaceUpdateList and FilterList? //// Investigate if we re-use src\modules\cmdpal\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\ListHelpers.cs InPlaceUpdateList and FilterList?

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Application <Application
x:Class="Microsoft.CmdPal.UI.App" x:Class="Microsoft.CmdPal.UI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

View File

@ -11,7 +11,7 @@
xmlns:help="using:Microsoft.CmdPal.UI.Helpers" xmlns:help="using:Microsoft.CmdPal.UI.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
Background="Transparent" Background="Transparent"
mc:Ignorable="d"> mc:Ignorable="d">
@ -40,7 +40,7 @@
Default="{StaticResource DefaultContextMenuViewModelTemplate}" /> Default="{StaticResource DefaultContextMenuViewModelTemplate}" />
<!-- Template for context items in the context item menu --> <!-- Template for context items in the context item menu -->
<DataTemplate x:Key="DefaultContextMenuViewModelTemplate" x:DataType="viewmodels:CommandContextItemViewModel"> <DataTemplate x:Key="DefaultContextMenuViewModelTemplate" x:DataType="viewModels:CommandContextItemViewModel">
<Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"> <Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="32" /> <ColumnDefinition Width="32" />
@ -70,7 +70,7 @@
</DataTemplate> </DataTemplate>
<!-- Template for context items flagged as critical --> <!-- Template for context items flagged as critical -->
<DataTemplate x:Key="CriticalContextMenuViewModelTemplate" x:DataType="viewmodels:CommandContextItemViewModel"> <DataTemplate x:Key="CriticalContextMenuViewModelTemplate" x:DataType="viewModels:CommandContextItemViewModel">
<Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"> <Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="32" /> <ColumnDefinition Width="32" />
@ -137,7 +137,7 @@
ItemsSource="{x:Bind CurrentPageViewModel.StatusMessages, Mode=OneWay}" ItemsSource="{x:Bind CurrentPageViewModel.StatusMessages, Mode=OneWay}"
Layout="{StaticResource VerticalStackLayout}"> Layout="{StaticResource VerticalStackLayout}">
<ItemsRepeater.ItemTemplate> <ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="viewmodels:StatusMessageViewModel"> <DataTemplate x:DataType="viewModels:StatusMessageViewModel">
<StackPanel <StackPanel
Grid.Row="0" Grid.Row="0"
Margin="0" Margin="0"

View File

@ -8,7 +8,7 @@
xmlns:local="using:Microsoft.CmdPal.UI.Controls" xmlns:local="using:Microsoft.CmdPal.UI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
Background="Transparent" Background="Transparent"
mc:Ignorable="d"> mc:Ignorable="d">

View File

@ -244,7 +244,7 @@ public sealed partial class SearchBar : UserControl,
_debounceTimer.Debounce( _debounceTimer.Debounce(
() => () =>
{ {
// Actually plumb Filtering to the viewmodel // Actually plumb Filtering to the view model
if (CurrentPageViewModel != null) if (CurrentPageViewModel != null)
{ {
CurrentPageViewModel.Filter = FilterBox.Text; CurrentPageViewModel.Filter = FilterBox.Text;
@ -282,7 +282,7 @@ public sealed partial class SearchBar : UserControl,
{ {
// GH #38712: // GH #38712:
// The ListPage will notify us of the `InitialSearchText` when // The ListPage will notify us of the `InitialSearchText` when
// we first load the viewmodel. We can use that as an // we first load the view model. We can use that as an
// opportunity to immediately select the search text. That lets // opportunity to immediately select the search text. That lets
// the user start typing a new search without manually // the user start typing a new search without manually
// selecting the old one. // selecting the old one.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

View File

@ -13,7 +13,7 @@
xmlns:local="using:Microsoft.CmdPal.UI" xmlns:local="using:Microsoft.CmdPal.UI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="using:CommunityToolkit.WinUI.UI.Controls" xmlns:toolkit="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
Background="Transparent" Background="Transparent"
mc:Ignorable="d"> mc:Ignorable="d">
@ -35,13 +35,13 @@
MarkdownTemplate="{StaticResource NestedMarkdownContentTemplate}" MarkdownTemplate="{StaticResource NestedMarkdownContentTemplate}"
TreeTemplate="{StaticResource TreeContentTemplate}" /> TreeTemplate="{StaticResource TreeContentTemplate}" />
<DataTemplate x:Key="FormContentTemplate" x:DataType="viewmodels:ContentFormViewModel"> <DataTemplate x:Key="FormContentTemplate" x:DataType="viewModels:ContentFormViewModel">
<Grid Margin="0,4,4,4" Padding="12,8,8,8"> <Grid Margin="0,4,4,4" Padding="12,8,8,8">
<cmdPalControls:ContentFormControl ViewModel="{x:Bind}" /> <cmdPalControls:ContentFormControl ViewModel="{x:Bind}" />
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="MarkdownContentTemplate" x:DataType="viewmodels:ContentMarkdownViewModel"> <DataTemplate x:Key="MarkdownContentTemplate" x:DataType="viewModels:ContentMarkdownViewModel">
<Grid Margin="0,4,4,4" Padding="12,8,8,8"> <Grid Margin="0,4,4,4" Padding="12,8,8,8">
<toolkit:MarkdownTextBlock <toolkit:MarkdownTextBlock
Background="Transparent" Background="Transparent"
@ -53,13 +53,13 @@
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="NestedFormContentTemplate" x:DataType="viewmodels:ContentFormViewModel"> <DataTemplate x:Key="NestedFormContentTemplate" x:DataType="viewModels:ContentFormViewModel">
<Grid> <Grid>
<cmdPalControls:ContentFormControl ViewModel="{x:Bind}" /> <cmdPalControls:ContentFormControl ViewModel="{x:Bind}" />
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="NestedMarkdownContentTemplate" x:DataType="viewmodels:ContentMarkdownViewModel"> <DataTemplate x:Key="NestedMarkdownContentTemplate" x:DataType="viewModels:ContentMarkdownViewModel">
<Grid> <Grid>
<toolkit:MarkdownTextBlock <toolkit:MarkdownTextBlock
Background="Transparent" Background="Transparent"
@ -71,7 +71,7 @@
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="TreeContentTemplate" x:DataType="viewmodels:ContentTreeViewModel"> <DataTemplate x:Key="TreeContentTemplate" x:DataType="viewModels:ContentTreeViewModel">
<StackPanel <StackPanel
Margin="0,4,4,4" Margin="0,4,4,4"
Padding="12,8,8,8" Padding="12,8,8,8"

View File

@ -10,7 +10,7 @@
xmlns:help="using:Microsoft.CmdPal.UI.Helpers" xmlns:help="using:Microsoft.CmdPal.UI.Helpers"
xmlns:local="using:Microsoft.CmdPal.UI" xmlns:local="using:Microsoft.CmdPal.UI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
Background="Transparent" Background="Transparent"
mc:Ignorable="d"> mc:Ignorable="d">
@ -27,7 +27,7 @@
EmptyValue="Collapsed" EmptyValue="Collapsed"
NotEmptyValue="Visible" /> NotEmptyValue="Visible" />
<DataTemplate x:Key="TagTemplate" x:DataType="viewmodels:TagViewModel"> <DataTemplate x:Key="TagTemplate" x:DataType="viewModels:TagViewModel">
<cpcontrols:Tag <cpcontrols:Tag
AutomationProperties.Name="{x:Bind Text, Mode=OneWay}" AutomationProperties.Name="{x:Bind Text, Mode=OneWay}"
BackgroundColor="{x:Bind Background, Mode=OneWay}" BackgroundColor="{x:Bind Background, Mode=OneWay}"
@ -39,7 +39,7 @@
</DataTemplate> </DataTemplate>
<!-- https://learn.microsoft.com/windows/apps/design/controls/itemsview#specify-the-look-of-the-items --> <!-- https://learn.microsoft.com/windows/apps/design/controls/itemsview#specify-the-look-of-the-items -->
<DataTemplate x:Key="ListItemViewModelTemplate" x:DataType="viewmodels:ListItemViewModel"> <DataTemplate x:Key="ListItemViewModelTemplate" x:DataType="viewModels:ListItemViewModel">
<Grid <Grid
Padding="0,12,0,12" Padding="0,12,0,12"
AutomationProperties.Name="{x:Bind Title, Mode=OneWay}" AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"

View File

@ -244,7 +244,7 @@ public sealed partial class ListPage : Page,
} }
else if (e.NewValue == null) else if (e.NewValue == null)
{ {
Logger.LogDebug("cleared viewmodel"); Logger.LogDebug("cleared view model");
} }
} }
} }

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="using:Microsoft.CmdPal.UI.Pages" xmlns:pages="using:Microsoft.CmdPal.UI.Pages"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
xmlns:winuiex="using:WinUIEx" xmlns:winuiex="using:WinUIEx"
Width="800" Width="800"
Height="480" Height="480"

View File

@ -208,7 +208,7 @@ public sealed partial class MainWindow : WindowEx,
// Remember, IsIconic == "minimized", which is entirely different state // Remember, IsIconic == "minimized", which is entirely different state
// from "show/hide" // from "show/hide"
// If we're currently minimized, restore us first, before we reveal // If we're currently minimized, restore us first, before we reveal
// our window. Otherwise we'd just be showing a minimized window - // our window. Otherwise, we'd just be showing a minimized window -
// which would remain not visible to the user. // which would remain not visible to the user.
if (PInvoke.IsIconic(hwnd)) if (PInvoke.IsIconic(hwnd))
{ {

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Page <Page
x:Class="Microsoft.CmdPal.UI.Pages.LoadingPage" x:Class="Microsoft.CmdPal.UI.Pages.LoadingPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Page <Page
x:Class="Microsoft.CmdPal.UI.Settings.ExtensionPage" x:Class="Microsoft.CmdPal.UI.Settings.ExtensionPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
@ -12,7 +12,7 @@
xmlns:local="using:Microsoft.CmdPal.UI.Settings" xmlns:local="using:Microsoft.CmdPal.UI.Settings"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
mc:Ignorable="d"> mc:Ignorable="d">
<Page.Resources> <Page.Resources>
@ -65,7 +65,7 @@
<ItemsRepeater ItemsSource="{x:Bind ViewModel.TopLevelCommands, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}"> <ItemsRepeater ItemsSource="{x:Bind ViewModel.TopLevelCommands, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}">
<ItemsRepeater.ItemTemplate> <ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="viewmodels:TopLevelViewModel"> <DataTemplate x:DataType="viewModels:TopLevelViewModel">
<controls:SettingsExpander <controls:SettingsExpander
DataContext="{x:Bind}" DataContext="{x:Bind}"
Description="{x:Bind Subtitle, Mode=OneWay}" Description="{x:Bind Subtitle, Mode=OneWay}"

View File

@ -11,7 +11,7 @@
xmlns:local="using:Microsoft.CmdPal.UI.Settings" xmlns:local="using:Microsoft.CmdPal.UI.Settings"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
mc:Ignorable="d"> mc:Ignorable="d">
<Grid> <Grid>
@ -28,7 +28,7 @@
<ItemsRepeater ItemsSource="{x:Bind viewModel.CommandProviders, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}"> <ItemsRepeater ItemsSource="{x:Bind viewModel.CommandProviders, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}">
<ItemsRepeater.ItemTemplate> <ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="viewmodels:ProviderSettingsViewModel"> <DataTemplate x:DataType="viewModels:ProviderSettingsViewModel">
<controls:SettingsCard <controls:SettingsCard
Click="SettingsCard_Click" Click="SettingsCard_Click"
DataContext="{x:Bind}" DataContext="{x:Bind}"

View File

@ -10,7 +10,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ptControls="using:Microsoft.CmdPal.UI.Controls" xmlns:ptControls="using:Microsoft.CmdPal.UI.Controls"
xmlns:ui="using:CommunityToolkit.WinUI" xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
mc:Ignorable="d"> mc:Ignorable="d">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

View File

@ -1 +1 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" /> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />

View File

@ -204,7 +204,7 @@ Let's see what this currently looks like in the Command Palette. First, deploy y
![alt text](image-3.png) ![alt text](image-3.png)
Then, open the Command Palette by pressing `Win+Ctl+.` and search for "Search SSH Keys". You should see the command displayed in the root view of the Command Palette like this: Then, open the Command Palette by pressing `Win+Ctrl+.` and search for "Search SSH Keys". You should see the command displayed in the root view of the Command Palette like this:
![alt text](image-4.png) ![alt text](image-4.png)

View File

@ -266,7 +266,7 @@ As some examples:
that once, we don't need to `CreateProcess` just to find that command title. that once, we don't need to `CreateProcess` just to find that command title.
This is a **frozen** extension. This is a **frozen** extension.
* Similarly for something like the GitHub extension - it's got multiple * Similarly for something like the GitHub extension - it's got multiple
top-level commands (My issues, Issue search, Repo search, etc), but these top-level commands (My issues, Issue search, Repo search, etc.), but these
top-level commands never change. This is a **frozen** extension. top-level commands never change. This is a **frozen** extension.
* The "Quick Links" extension has a dynamic list of top-level commands. * The "Quick Links" extension has a dynamic list of top-level commands.
This is a **fresh** extension.[^3] This is a **fresh** extension.[^3]
@ -392,7 +392,7 @@ command), we need to quickly load that app and get the command for it.
1. If the cached command had an `id`, try to look up the command with 1. If the cached command had an `id`, try to look up the command with
`ICommandProvider.GetCommand(id)`, passing the `id`. If that returns an `ICommandProvider.GetCommand(id)`, passing the `id`. If that returns an
item, we can move on to the next stem item, we can move on to the next stem
2. Otherwise (the command wasn't assigned an ID, or `GetCommand` returned 2. Otherwise, (the command wasn't assigned an ID, or `GetCommand` returned
null): all `TopLevelItems` on that `CommandProvider`. null): all `TopLevelItems` on that `CommandProvider`.
* Search through all the returned commands with the same `id` or * Search through all the returned commands with the same `id` or
`icon/title/subtitle/name`, and return that one. `icon/title/subtitle/name`, and return that one.
@ -457,7 +457,7 @@ it be cheap from an engineering standpoint.
### From winget ### From winget
Winget on the other hand, does allow packages to specify arbitrary tags, and let WinGet on the other hand, does allow packages to specify arbitrary tags, and let
apps query them easily. We can use that as a system to load a list of packages apps query them easily. We can use that as a system to load a list of packages
available via winget directly in DevPal. We'll specify a well-known tag that available via winget directly in DevPal. We'll specify a well-known tag that
developers can use in their winget package manifest to specify that their developers can use in their winget package manifest to specify that their
@ -611,7 +611,7 @@ This will create a single command in DevPal that, when selected, will open
Hacker News in the user's default web browser. Hacker News in the user's default web browser.
Commands can also be `Page`s, which represent additional "nested" pages within Commands can also be `Page`s, which represent additional "nested" pages within
DevPal. When the user selects an command that implements `IPage`, DevPal will DevPal. When the user selects a command that implements `IPage`, DevPal will
navigate to a page for that command, rather than calling `Invoke` on it. Skip navigate to a page for that command, rather than calling `Invoke` on it. Skip
ahead to [Pages](#Pages) for more information on the different types of pages. ahead to [Pages](#Pages) for more information on the different types of pages.
@ -628,7 +628,7 @@ different types depending on where the command is being used:
* `IListPage.GetItems` * `IListPage.GetItems`
* Sender is the `IListItem` for the list item selected for that command * Sender is the `IListItem` for the list item selected for that command
* `ICommandItem.MoreCommands` (context menus) * `ICommandItem.MoreCommands` (context menus)
* Sender is the `IListItem` which the command was attached to for a list page, or * Sender is the `IListItem` which the command was attached to a list page, or
* the `ICommandItem` of the top-level command (if this is a context item on a top level command) * the `ICommandItem` of the top-level command (if this is a context item on a top level command)
* `IContentPage.Commands` * `IContentPage.Commands`
* Sender is the `IContentPage` itself * Sender is the `IContentPage` itself
@ -656,7 +656,7 @@ Use cases for each `CommandResultKind`:
* `Dismiss` - Close DevPal after the action is executed. All current state * `Dismiss` - Close DevPal after the action is executed. All current state
is dismissed as well. On the next launch, DevPal will start from the main is dismissed as well. On the next launch, DevPal will start from the main
page with a blank query. page with a blank query.
* Ex: An action that opens an application. The Puser doesn't need DevPal * Ex: An action that opens an application. The user doesn't need DevPal
open after the application is opened, nor do they need the query they used open after the application is opened, nor do they need the query they used
to find the action. to find the action.
* `GoHome` - Navigate back to the main page of DevPal, but keep it open. * `GoHome` - Navigate back to the main page of DevPal, but keep it open.
@ -752,7 +752,7 @@ which the user can quickly filter and search through.
Lists can be either "static" or "dynamic": Lists can be either "static" or "dynamic":
* A **static** list leaves devpal in charge of filtering the list of items, * A **static** list leaves devpal in charge of filtering the list of items,
based on the query the user typed. based on the query that the user typed.
* These are implementations of the default `IListPage`. * These are implementations of the default `IListPage`.
* In this case, DevPal will use a fuzzy string match over the `Name` of the * In this case, DevPal will use a fuzzy string match over the `Name` of the
action, the `Subtitle`, and any `Text` on the `Tag`s. action, the `Subtitle`, and any `Text` on the `Tag`s.
@ -959,7 +959,7 @@ as the user navigates the list.
Consider the Windows Registry command. When the page is initially loaded, it Consider the Windows Registry command. When the page is initially loaded, it
displays only the top-level registry keys (`HKEY_CURRENT_USER`, displays only the top-level registry keys (`HKEY_CURRENT_USER`,
`HKEY_LOCAL_MACHINE`, etc). If the user types `HKC`, the command will filter the `HKEY_LOCAL_MACHINE`, etc.). If the user types `HKC`, the command will filter the
results down to just `HKEY_CURRENT_USER`, `HKEY_CLASSES_ROOT` and results down to just `HKEY_CURRENT_USER`, `HKEY_CLASSES_ROOT` and
`HKEY_CURRENT_CONFIG`. However, if the user at this point taps the right-arrow `HKEY_CURRENT_CONFIG`. However, if the user at this point taps the right-arrow
key, DevPall will use the `TextToSuggest` from the `HKEY_CURRENT_USER` key, DevPall will use the `TextToSuggest` from the `HKEY_CURRENT_USER`
@ -1375,7 +1375,7 @@ app's icon.
![](https://miro.medium.com/v2/resize:fit:720/format:webp/1*Nd5fvJM8LUQ1w3DAWN-pvA.gif) ![](https://miro.medium.com/v2/resize:fit:720/format:webp/1*Nd5fvJM8LUQ1w3DAWN-pvA.gif)
(However, the buttons in the gif for "Open", "Uninstall", etc, are not part of (However, the buttons in the gif for "Open", "Uninstall", etc., are not part of
the `Details`, they are part of the "more commands" dropdown. **It's a mockup**) the `Details`, they are part of the "more commands" dropdown. **It's a mockup**)
<!-- This block needs to appear in the idl _before_ IListItem, but from a doc <!-- This block needs to appear in the idl _before_ IListItem, but from a doc
@ -1509,7 +1509,7 @@ settings for your extension being lost.
Providers may also specify a set of `FallbackCommands`[^2]. These are special Providers may also specify a set of `FallbackCommands`[^2]. These are special
top-level items which allow extensions to have dynamic top-level items which top-level items which allow extensions to have dynamic top-level items which
respond to the text the user types on the main list page. respond to the text that the user types on the main list page.
These are implemented with a special `IFallbackHandler` interface. This is an These are implemented with a special `IFallbackHandler` interface. This is an
object that will be informed whenever the query changes in List page hosting it. object that will be informed whenever the query changes in List page hosting it.

View File

@ -469,7 +469,7 @@ public class UWPApplication : IProgram
} }
else else
{ {
// for C:\Windows\MiracastView etc // for C:\Windows\MiracastView, etc.
path = Path.Combine(Package.Location, "Assets", uri); path = Path.Combine(Package.Location, "Assets", uri);
} }

View File

@ -827,7 +827,7 @@ public class Win32Program : IProgram
var paths = new HashSet<string>(defaultHashsetSize); var paths = new HashSet<string>(defaultHashsetSize);
var runCommandPaths = new HashSet<string>(defaultHashsetSize); var runCommandPaths = new HashSet<string>(defaultHashsetSize);
// Parallelize multiple sources, and priority based on paths which most likely contain .lnks which are formatted // Parallelize multiple sources, and priority based on paths which most likely contain .lnk files which are formatted
var sources = new (bool IsEnabled, Func<IEnumerable<string>> GetPaths)[] var sources = new (bool IsEnabled, Func<IEnumerable<string>> GetPaths)[]
{ {
(true, () => CustomProgramPaths(settings.ProgramSources, settings.ProgramSuffixes)), (true, () => CustomProgramPaths(settings.ProgramSources, settings.ProgramSuffixes)),

View File

@ -13,7 +13,7 @@ namespace Microsoft.CmdPal.Ext.Apps.Storage;
/// <summary> /// <summary>
/// The intent of this class is to provide a basic subset of 'list' like operations, without exposing callers to the internal representation /// The intent of this class is to provide a basic subset of 'list' like operations, without exposing callers to the internal representation
/// of the data structure. Currently this is implemented as a list for it's simplicity. /// of the data structure. Currently this is implemented as a list for its simplicity.
/// </summary> /// </summary>
/// <typeparam name="T">typeof</typeparam> /// <typeparam name="T">typeof</typeparam>
public class ListRepository<T> : IRepository<T>, IEnumerable<T> public class ListRepository<T> : IRepository<T>, IEnumerable<T>

View File

@ -92,7 +92,7 @@ internal sealed partial class PackageRepository : ListRepository<UWPApplication>
// InitializeAppInfo will throw if there is no AppxManifest.xml for the package. // InitializeAppInfo will throw if there is no AppxManifest.xml for the package.
// Note there are sometimes multiple packages per product and this doesn't necessarily mean that we haven't found the app. // Note there are sometimes multiple packages per product and this doesn't necessarily mean that we haven't found the app.
// eg. "Could not find file 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_2020.616.45.0_neutral_~_8wekyb3d8bbwe\\AppxManifest.xml'." // e.g. "Could not find file 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_2020.616.45.0_neutral_~_8wekyb3d8bbwe\\AppxManifest.xml'."
catch (System.IO.FileNotFoundException ex) catch (System.IO.FileNotFoundException ex)
{ {
Logger.LogError(ex.Message); Logger.LogError(ex.Message);

View File

@ -107,7 +107,7 @@ internal sealed partial class Win32ProgramRepository : ListRepository<Programs.W
// fix for https://github.com/microsoft/PowerToys/issues/34391 // fix for https://github.com/microsoft/PowerToys/issues/34391
// the msi installer creates a shortcut, which is detected by the PT Run and ends up in calling this OnAppRenamed method // the msi installer creates a shortcut, which is detected by the PT Run and ends up in calling this OnAppRenamed method
// the thread needs to be halted for a short time to avoid locking the new shortcut file as we read it, otherwise the lock causes // the thread needs to be halted for a short time to avoid locking the new shortcut file as we read it; otherwise, the lock causes
// in the issue scenario that a warning is popping up during the msi install process. // in the issue scenario that a warning is popping up during the msi install process.
await Task.Delay(1000).ConfigureAwait(false); await Task.Delay(1000).ConfigureAwait(false);
@ -205,12 +205,12 @@ internal sealed partial class Win32ProgramRepository : ListRepository<Programs.W
} }
// When a URL application is deleted, we can no longer get the HashCode directly from the path because the FullPath a Url app is the URL obtained from reading the file // When a URL application is deleted, we can no longer get the HashCode directly from the path because the FullPath a Url app is the URL obtained from reading the file
[System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Using CurrentCultureIgnoreCase since application names could be dependent on currentculture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Using CurrentCultureIgnoreCase since application names could be dependent on current culture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190")]
private Win32Program? GetAppWithSameNameAndExecutable(string name, string executableName) private Win32Program? GetAppWithSameNameAndExecutable(string name, string executableName)
{ {
foreach (Win32Program app in Items) foreach (Win32Program app in Items)
{ {
// Using CurrentCultureIgnoreCase since application names could be dependent on currentculture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190 // Using CurrentCultureIgnoreCase since application names could be dependent on current culture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190
if (name.Equals(app.Name, StringComparison.CurrentCultureIgnoreCase) && executableName.Equals(app.ExecutableName, StringComparison.CurrentCultureIgnoreCase)) if (name.Equals(app.Name, StringComparison.CurrentCultureIgnoreCase) && executableName.Equals(app.ExecutableName, StringComparison.CurrentCultureIgnoreCase))
{ {
return app; return app;

View File

@ -73,7 +73,7 @@ public static class CalculateHelper
private static string CheckScientificNotation(string input) private static string CheckScientificNotation(string input)
{ {
/** /**
* NOTE: By the time the expression gets to us, it's already in English format. * NOTE: By the time that the expression gets to us, it's already in English format.
* *
* Regex explanation: * Regex explanation:
* (-?(\d+({0}\d*)?)|-?({0}\d+)): Used to capture one of two types: * (-?(\d+({0}\d*)?)|-?({0}\d+)): Used to capture one of two types:

View File

@ -42,7 +42,7 @@ public sealed partial class FallbackCalculatorItem : FallbackCommandItem
_copyCommand.Name = string.IsNullOrWhiteSpace(query) ? string.Empty : Resources.calculator_copy_command_name; _copyCommand.Name = string.IsNullOrWhiteSpace(query) ? string.Empty : Resources.calculator_copy_command_name;
Title = result.Title; Title = result.Title;
// we have to make the subtitle the equation, // we have to make the subtitle into an equation,
// so that we will still string match the original query // so that we will still string match the original query
// Otherwise, something like 1+2 will have a title of "3" and not match // Otherwise, something like 1+2 will have a title of "3" and not match
Subtitle = query; Subtitle = query;

View File

@ -55,7 +55,7 @@ internal static partial class QueryHelper
/// <param name="query">The query that could contain parts</param> /// <param name="query">The query that could contain parts</param>
/// <param name="queryKey">The key part of the query</param> /// <param name="queryKey">The key part of the query</param>
/// <param name="queryValueName">The value name part of the query</param> /// <param name="queryValueName">The value name part of the query</param>
/// <returns><see langword="true"/> when the query search for a key and a value name, otherwise <see langword="false"/></returns> /// <returns><see langword="true"/> when the query search for a key and a value name; otherwise, <see langword="false"/></returns>
internal static bool GetQueryParts(in string query, out string queryKey, out string queryValueName) internal static bool GetQueryParts(in string query, out string queryKey, out string queryValueName)
{ {
var sanitizedQuery = SanitizeQuery(query); var sanitizedQuery = SanitizeQuery(query);

View File

@ -70,7 +70,7 @@ public class ShellListPageHelpers
var cmd = query; var cmd = query;
if (string.IsNullOrEmpty(cmd)) if (string.IsNullOrEmpty(cmd))
{ {
results = ResultsFromlHistory(); results = ResultsFromHistory();
} }
else else
{ {
@ -90,16 +90,16 @@ public class ShellListPageHelpers
public List<CommandContextItem> LoadContextMenus(ListItem listItem) public List<CommandContextItem> LoadContextMenus(ListItem listItem)
{ {
var resultlist = new List<CommandContextItem> var resultList = new List<CommandContextItem>
{ {
new(new ExecuteItem(listItem.Title, _settings, RunAsType.Administrator)), new(new ExecuteItem(listItem.Title, _settings, RunAsType.Administrator)),
new(new ExecuteItem(listItem.Title, _settings, RunAsType.OtherUser )), new(new ExecuteItem(listItem.Title, _settings, RunAsType.OtherUser )),
}; };
return resultlist; return resultList;
} }
private List<ListItem> ResultsFromlHistory() private List<ListItem> ResultsFromHistory()
{ {
IEnumerable<ListItem> history = _settings.Count.OrderByDescending(o => o.Value) IEnumerable<ListItem> history = _settings.Count.OrderByDescending(o => o.Value)
.Select(m => new ListItem(new ExecuteItem(m.Key, _settings)) .Select(m => new ListItem(new ExecuteItem(m.Key, _settings))

View File

@ -158,7 +158,7 @@ internal static class TimeAndDateHelper
/// <param name="input">String with date/time</param> /// <param name="input">String with date/time</param>
/// <param name="timestamp">The new <see cref="DateTime"/> object</param> /// <param name="timestamp">The new <see cref="DateTime"/> object</param>
/// <param name="inputParsingErrorMsg">Error message shown to the user</param> /// <param name="inputParsingErrorMsg">Error message shown to the user</param>
/// <returns>True on success, otherwise false</returns> /// <returns>True on success; otherwise, false</returns>
internal static bool ParseStringAsDateTime(in string input, out DateTime timestamp, out string inputParsingErrorMsg) internal static bool ParseStringAsDateTime(in string input, out DateTime timestamp, out string inputParsingErrorMsg)
{ {
inputParsingErrorMsg = string.Empty; inputParsingErrorMsg = string.Empty;
@ -309,7 +309,7 @@ internal static class TimeAndDateHelper
/// Test if input is special parsing for Unix time, Unix time in milliseconds, file time, ... /// Test if input is special parsing for Unix time, Unix time in milliseconds, file time, ...
/// </summary> /// </summary>
/// <param name="input">String with date/time</param> /// <param name="input">String with date/time</param>
/// <returns>True if yes, otherwise false</returns> /// <returns>True if yes; otherwise, false</returns>
internal static bool IsSpecialInputParsing(string input) internal static bool IsSpecialInputParsing(string input)
{ {
return _regexSpecialInputFormats.IsMatch(input); return _regexSpecialInputFormats.IsMatch(input);

Some files were not shown because too many files have changed in this diff Show More