From 512f6a516cd46bded80e2cdfbbb6d4b096ec4ed6 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Tue, 17 Nov 2015 18:06:18 +0000
Subject: [PATCH] If opt.password is true, echo password_char instead of the
 hotkey.

---
 exec/load/dorkit.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/exec/load/dorkit.js b/exec/load/dorkit.js
index 33fa0bcb12..86e083177c 100644
--- a/exec/load/dorkit.js
+++ b/exec/load/dorkit.js
@@ -568,8 +568,12 @@ var dk = {
 				}
 				key = this.getkey();
 				if (opt.hotkeys !== undefined && str.length === 0 && opt.hotkeys.indexOf(key) !== -1) {
-					if (ascii(key) >= 32)
-						this.print(key);
+					if (ascii(key) >= 32) {
+						if (opt.password)
+							this.print(opt.password_char);
+						else
+							this.print(key);
+					}
 					if (opt.crlf)
 						this.println('');
 					return key;
-- 
GitLab