From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99632335BD9; Mon, 18 Aug 2025 13:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755524257; cv=none; b=AQrxlfX3+HsL6cLM90G5mw/SwA+GIxZ8DfKmhkYf02IIXJ5zc9SlX1BrjfwBG8+2EjgFrZudnD945M3whMkhF24A9K+OQxYMzn+MUvLCpwmzDDV1WtS6uyCn0J0WSnhQ7Y1Z5zJUFRrpXniXtNYImn6TTvMZpUUdbO1zYH1gcXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755524257; c=relaxed/simple; bh=pTjSXGknMmls/YD+eDBsFEXqw7O2QWey2hxxXg/YoUM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YDfPvdEhgl2adYhxWwG3EXkmMMgek8Nr7hihUOYAaKoeaK7LLOUckyEpjf/9nMDwp5JYub30DVBOl8yFwLkDXI2xa/A5T3X+Vs9aBinPpbJiHKWB/51MCtwUkDyDa7TXMCkA3qegr7YNkQPQ/2HfF1lC+7xLTrRHlDWgB9ZCXLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z4+e7cWV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="z4+e7cWV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F11FDC113D0; Mon, 18 Aug 2025 13:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755524257; bh=pTjSXGknMmls/YD+eDBsFEXqw7O2QWey2hxxXg/YoUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z4+e7cWV1ktQx/NsNOPn7NVp/o3hccu5WHqJ5BUTGcMuChLWF2MapsOOLzBl3Fr9b 2c7JmOv0oVJbbUeJ/lmf7ESqoMkk22S6YAd+2kQxDkXQPkZ2R7PMiIMf4VGUj7EZdJ 3Qn56M8CQ2eN8o822u1Apk30tDRAwMUu+2z2ZJGo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Yann E. MORIN" , Peter Korsgaard , Cherniaev Andrei , Masahiro Yamada , Sasha Levin Subject: [PATCH 6.15 416/515] kconfig: lxdialog: fix space to (de)select options Date: Mon, 18 Aug 2025 14:46:42 +0200 Message-ID: <20250818124514.440841046@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124458.334548733@linuxfoundation.org> References: <20250818124458.334548733@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yann E. MORIN [ Upstream commit 694174f94ebeeb5ec5cc0e9de9b40c82057e1d95 ] In case a menu has comment without letters/numbers (eg. characters matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *), hitting space will cycle through those comments, rather than selecting/deselecting the currently-highlighted option. This is the behaviour of hitting any letter/digit: jump to the next option which prompt starts with that letter. The only letters that do not behave as such are 'y' 'm' and 'n'. Prompts that start with one of those three letters are instead matched on the first letter that is not 'y', 'm' or 'n'. Fix that by treating 'space' as we treat y/m/n, ie. as an action key, not as shortcut to jump to prompt. Signed-off-by: Yann E. MORIN Signed-off-by: Peter Korsgaard Signed-off-by: Cherniaev Andrei [masahiro: took from Buildroot, adjusted the commit subject] Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/lxdialog/menubox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index 6e6244df0c56..d4c19b7beebb 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c @@ -264,7 +264,7 @@ int dialog_menu(const char *title, const char *prompt, if (key < 256 && isalpha(key)) key = tolower(key); - if (strchr("ynmh", key)) + if (strchr("ynmh ", key)) i = max_choice; else { for (i = choice + 1; i < max_choice; i++) { -- 2.39.5