From 1137837745d1db026f01fe5ef4386747322f290a Mon Sep 17 00:00:00 2001 From: Alisher Galiev Date: Wed, 9 Oct 2024 07:34:28 +0500 Subject: [PATCH] Added changes to release notes for version 0.99.0 due to nushell/#14020 --- blog/2024-10-15-nushell_0_99_0.md | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/blog/2024-10-15-nushell_0_99_0.md b/blog/2024-10-15-nushell_0_99_0.md index d8195075181..0336b2febbd 100644 --- a/blog/2024-10-15-nushell_0_99_0.md +++ b/blog/2024-10-15-nushell_0_99_0.md @@ -27,6 +27,7 @@ As part of this release, we also publish a set of optional plugins you can insta - [_Highlights and themes of this release_](#highlights-and-themes-of-this-release-toc) - [_Changes_](#changes-toc) - [_Additions_](#additions-toc) + - [_`enhanced keybinding configuration`_](#enhanced-keybinding-configuration-toc) - [_Breaking changes_](#breaking-changes-toc) - [_Deprecations_](#deprecations-toc) - [_Removals_](#removals-toc) @@ -70,6 +71,40 @@ As part of this release, we also publish a set of optional plugins you can insta ## Additions [[toc](#table-of-content)] +### `enhanced keybinding configuration` [[toc](#table-of-content)] + +**Support for Unicode Code Points in Keycodes.** + +Starting from [#14020](https://github.com/nushell/nushell/pull/14020), users can now specify characters in the keycode field using their Unicode code points, in the format `char_uXXXX`, where `XXXX` is the hexadecimal Unicode code point. This provides greater flexibility when configuring keybindings in Nushell. + +Specifying Unicode code points can help eliminate confusion when characters from different Unicode blocks look identical but have different code points. For example, by using `char_u0041` for the Latin `A`, `char_u0391` for the Greek `Α`, or `char_u0410` for the Cyrillic `А`, users can accurately define keybindings and avoid ambiguity in configurations. + +**Key Feature:** + +The current implementation does not restrict the number of leading zeroes when specifying Unicode code points. For example, the character `A` can be represented as `char_u41,` `char_u0041`, or even `char_u000041`. However, it is recommended to use four hexadecimal digits (e.g., `char_u0041`) to improve readability and maintain a consistent format across different configurations. This recommendation follows the standard Unicode representation and helps prevent ambiguity. + +**Example usage:** + +```nushell +$env.config = { + ... + + keybindings: [ + { + name: , # name of the command + modifier: none, # key modifier + keycode: char_u0391, # Unicode code for Greek 'Α' + mode: vi_normal, # mode in which this binding should work + event: { + send: # action to be performed + } + } + ] + + ... +} +``` + ## Breaking changes [[toc](#table-of-content)] ### Standard Library