From nobody Wed Nov 27 02:31:45 2024 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 0520C149011 for ; Mon, 14 Oct 2024 09:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728897566; cv=none; b=pex6sHGfYN2npmtwLDDwnr9qFKkWFiAB0Vvlny6Iu+oEFTYF1NAdRq4sbHXxI4EpXwGvHiXNtLiVFrnjG2GsKdF12hbucpOERj2FFM2uP0jp6ZsN37qf5XZ66qaEKTwvuIj6TAPNSEWTqkjsz+Rpfn6iNjIViOgXTD2vKS1m88s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728897566; c=relaxed/simple; bh=wVNYUbvUl3sPG53le+WJDckMtDV+JM8zWMYsaYz1umk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hm0IdmnsZFsuPRAZxJAK7313UqwWX0Yu/QyfOcgbe0kIkZBh+H9jxPni+5KH0wdyaJZYwF27FyxH2dbJeKqBl3F12lW4IR8iUhxi3FmjX20r9JiWF2MafxCnqIf4jkQipgmVFG4DalxBqwQxbFYI/S8ifjRhdUxzUgMKmgMlFrg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=XNZqVbGx; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="XNZqVbGx" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1728897560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Dj7fxHIiOkLjML343LBKlVwG31MU/qAIpzhZyO5s5uo=; b=XNZqVbGxPAt4UpWQJEvW9S6vOheuiEE+d+ckHEJ4Dkn0nJ7iFM5gbzGHS7oVKxebT+Jm8e v2r2JQHQFi9t+gamFt0DGppufz9iJZIM0gcBrUB72qlywyg0N8gIFjQyG1Bg4nFNwHxXa6 6BFmFUv4Q9+At1ZRicReL7Zj9QvROPE= From: Thorsten Blum To: Masahiro Yamada Cc: Thorsten Blum , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kconfig: nconf: Use TAB to cycle thru dialog buttons Date: Mon, 14 Oct 2024 11:18:28 +0200 Message-ID: <20241014091828.23446-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Add the ability to cycle through dialog buttons with the TAB key. Signed-off-by: Thorsten Blum --- scripts/kconfig/nconf.gui.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 72b605efe549..aeac9e5b06ee 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -277,6 +277,15 @@ int btn_dialog(WINDOW *main_window, const char *msg, i= nt btn_num, ...) case KEY_RIGHT: menu_driver(menu, REQ_RIGHT_ITEM); break; + case 9: /* TAB */ + if (btn_num > 1) { + /* cycle through buttons */ + if (item_index(current_item(menu)) =3D=3D btn_num-1) + menu_driver(menu, REQ_FIRST_ITEM); + else + menu_driver(menu, REQ_NEXT_ITEM); + } + break; case 10: /* ENTER */ case 27: /* ESCAPE */ case ' ': --=20 2.47.0