You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is important to have an established process of how to reconcile shortcuts between OS's. My preferred method will be to use Perl and Regex to accomplish this.
A lot of the following will be a mix of pseudo-like code and regex.
Remove any possible header or mention of commonly used shortcuts (assuming they are repeated in the file). Commonly used shortcuts however could be useful for cheatsheet like applications, so it is desirable to have.
Remove any shortcuts that already match between Source and Destination OS.
Win/Linux <=> macOS
If Win <=> macOS Then remove Linux column
Regex: /(.+),.+?$/$1/gm
If Linux <=> macOS Then remove Windows column
Simple Regex: /^(.?),(.?),(.?),(.?)$/$1,$4,$3/gm
Regex that accepts commas in between double quotes: /^("(.+?)"|(.?)),("(.+?)"|(.?)),("(.+?)"|(.?)),("(.+?)"|(.?))$/$7::$4 ;$1/gm
Remove rows that have matching keymaps.
Note: Ctrl & Cmd are matching. Ctrl & Ctrl are not, if those exist then Ctrl will be Super/Win for a mac remap as that is the physical Ctrl key.
Read csv into a list, array, or 2d array and begin the clean up process.
1st Find all Existing matching in plain text. Alt = Alt are the only real matches.
Remove matches from list/array
2nd Ctrl = Ctrl matches will need Super/Win to Ctrl keymaps to be automatically generated for proper remap.
Remove matches from list/array
3rd Update remaining, all Cmd references should convert to Ctrl, run another check.
All keymaps that do not need remapping should be eliminated
What remains should be the "wildly different" keymaps.
Apply the proper key remap symbols or logic for Autohotkey or xkeysnail to properly map what remains.
The text was updated successfully, but these errors were encountered:
It is important to have an established process of how to reconcile shortcuts between OS's. My preferred method will be to use Perl and Regex to accomplish this.
A lot of the following will be a mix of pseudo-like code and regex.
Remove any possible header or mention of commonly used shortcuts (assuming they are repeated in the file). Commonly used shortcuts however could be useful for cheatsheet like applications, so it is desirable to have.
Remove any shortcuts that already match between Source and Destination OS.
If Win <=> macOS Then remove Linux column
Regex: /(.+),.+?$/$1/gm
If Linux <=> macOS Then remove Windows column
Simple Regex: /^(.?),(.?),(.?),(.?)$/$1,$4,$3/gm
Regex that accepts commas in between double quotes: /^("(.+?)"|(.?)),("(.+?)"|(.?)),("(.+?)"|(.?)),("(.+?)"|(.?))$/$7::$4 ;$1/gm
Note: Ctrl & Cmd are matching. Ctrl & Ctrl are not, if those exist then Ctrl will be Super/Win for a mac remap as that is the physical Ctrl key.
The text was updated successfully, but these errors were encountered: