Re: [PATCH v3] kdb: fix ctrl+e/a/f/b/d/p/n broken in keyboard mode
From: Doug Anderson
Date: Mon Nov 11 2024 - 17:16:16 EST
Hi,
On Mon, Nov 11, 2024 at 1:56 PM Nir Lichtman <nir@xxxxxxxxxxxx> wrote:
>
> Problem: When using kdb via keyboard it does not react to control
> characters which are supported in serial mode.
>
> Example: Chords such as ctrl+a/e/d/p do not work in keyboard mode
>
> Solution: Before disregarding non-printable key characters, check if they
> are one of the supported control characters, I have took the control
> characters from the switch case upwards in this function that translates
> scan codes of arrow keys/backspace/home/.. to the control characters.
>
> Suggested-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
> Signed-off-by: Nir Lichtman <nir@xxxxxxxxxxxx>
> ---
>
> v2: Add CTRL macro following Douglas's suggestion in the CR of v1
> v3: Safely wrap the usage of the macro args and fix switch ident
>
> kernel/debug/kdb/kdb_keyboard.c | 33 ++++++++++++++++++++++++---------
> 1 file changed, 24 insertions(+), 9 deletions(-)
Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>