18 Commits
Author SHA1 Message Date
Jason Shirk a7af25aa37 Stop dispatching on ConsoleKeyInfo (#831)
There are likely issues introduced by this PR,
but I'm merging for a new Beta so this code gets more testing.

* Introduce PSKeyInfo type alias
* Explicit conversions b/w ConsoleKeyInfo and PSKeyInfo
* Change tests to use actual ConsoleKeyInfo data
* Add fr-FR keyboard layout tests
* Add KeyInfo-ru-RU-windows.json (#839)

All impossible without Shift shortcuts labeled as "Investigate: true"
Alt+Spacebar tracked by windows itself

* Add KeyInfo for Polish (Programmers) layout on Windows and Linux (#870)

On Windows *Alt+Spacebar* is hijacked by Windows
On Linux any *Alt+F1-12* combination was not detected
2019-03-20 16:14:05 -07:00
Dongbo Wang 21cd4e3850 Fix a few custom key binding on Windows (#657)
Fix #580.
2018-03-25 11:11:13 -07:00
Jason Shirk c1c03cf1cf Infer Shift for A-Z in custom bindings 2017-12-04 14:04:47 -08:00
Jason Shirk 63d2dcf6da Portable custom key bindings
Rewrote the custom key binding code to be more portable.

Some runtime checks are necessary because of impossible to reconcile
differences.

Some Win32 P/Invoke calls are still needed due to lack of information in
the ConsoleKeyInfo.

Some keys are currently not available on Linux due to a CLR bug, others
aren't available ever because terminals don't unique character sequences
for a given key press that might differ in just the Shift or Ctrl state.
2017-10-15 22:03:56 -07:00
Jason Shirk bff16f4beb Correct resources namespace 2017-09-04 23:20:37 -07:00
Josh Soref ff80a13550 Spelling comments
* spelling: comments in src/Microsoft.PowerShell.PSReadLine
2017-09-02 21:03:11 -07:00
Jason Shirk 443b9a5240 use nameof 2017-07-31 17:22:23 -07:00
Jason Shirk fc55704f83 Inline out variable parameters 2017-07-31 16:24:57 -07:00
Jason Shirk (POWERSHELL) 618b4971ef Move some apis to be internal 2016-01-17 08:52:40 -08:00
jason@truewheels.net 50b0bdad8e Cleanup resources 2015-12-24 21:06:48 -08:00
jason@truewheels.net a80c1a6fd0 Fix formatting of error message 2015-11-14 19:15:41 -08:00
Jason Shirk (POWERSHELL) 94a6ba40c9 Fix/suppress various FxCop errors 2015-06-18 18:24:23 -07:00
Jason Shirk (POWERSHELL) c986e0eae5 Rename namespace PSConsoleUtilities to Microsoft.PowerShell 2015-06-18 15:32:20 -07:00
Jason Shirk (POWERSHELL) 6408a4c96c Add copyright header 2015-06-18 15:04:49 -07:00
jason@truewheels.net 900e3057f2 Cleanup some Resharper issues 2014-04-13 11:21:30 -07:00
jason@truewheels.net 8f36cfc3a7 Fix conversion from string=>ConsoleKey for digits 2014-01-06 09:18:19 -08:00
jason@truewheels.net 2553fa3bf2 Improve key->string conversion
The strings shown for commands like Get-PSReadlineKeyHandler or
shown from functions WhatIsKey and ShowKeyBindings should now
match what you can use with Set-PSReadlineKeyHandler.

These strings will also omit +Shift in most cases because it
is usually clear from the character, e.g. the following are
equivalent but the former is preferred.

    Ctrl+?
    Ctrl+Shift+/
2013-12-14 13:23:47 -08:00
Jason Shirk 3e23733fd5 Support 2 key chords
Support for 2 key chords has been added.

There is a small breaking change in Set-PSReadlineKeyHandler
because the -CtrlX switch is no longer needed.  It could have
been left in, but it's better to just remove it - not very
many people use this module yet.

The signature of key handlers was also changed to better support
features that have not yet been implemented.  The signature change
shouldn't affect any existing key handlers because default arguments
should cover those cases.
2013-09-11 17:55:30 -07:00