From 0a59dd56388274476792545376a06bae4aa576b4 Mon Sep 17 00:00:00 2001 From: devStorm <59678453+developStorm@users.noreply.github.com> Date: Mon, 18 May 2020 05:27:57 -0700 Subject: [PATCH] Activate key on enter --- app/dashboard/templates/dashboard/fido_setup.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/dashboard/templates/dashboard/fido_setup.html b/app/dashboard/templates/dashboard/fido_setup.html index 424c16fd..198591f8 100644 --- a/app/dashboard/templates/dashboard/fido_setup.html +++ b/app/dashboard/templates/dashboard/fido_setup.html @@ -56,6 +56,13 @@ } $("#btnRegisterKey").click(registerKey); + + document.getElementById("key_name").addEventListener("keydown", event => { + if (event.keyCode === 13) { + event.preventDefault(); + document.getElementById("btnRegisterKey").click(); + } + });