diff --git a/src/help/PaymentComponent.tsx b/src/help/PaymentComponent.tsx index 6a53026..22c5e27 100644 --- a/src/help/PaymentComponent.tsx +++ b/src/help/PaymentComponent.tsx @@ -146,6 +146,13 @@ export const PaymentComponent = () => { placeholder="Enter license key" onChange={(e) => { setRedeemEnabled(e.target.value.length > 0); + }} + onKeyDown={(e) => { + if (e.key != "Enter") return; + if (!redeemEnabled) return; + applyChoices({ + licenseKey: (document.getElementById("redeemCodeInput") as HTMLInputElement).value + }) }}/> { } catch (e) { } // eslint-disable-line no-empty return true; -} \ No newline at end of file +}