Skip to content

Commit e3e734a

Browse files
authored
Update test.html
1 parent 5948deb commit e3e734a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

test.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ <h2>查碼練習</h2>
533533
// 英文模式下,長按 Shift 顯示的對應字元(全數改為半形)
534534
const keyname_map_english_shifted = {
535535
'1': '!', '2': '@', '3': '#', '4': '$', '5': '%', '6': '^', '7': '&', '8': '*', '9': '(', '0': ')',
536-
'q': 'Q', 'w': 'W', 'e': 'W', 'r': 'R', 't': 'T', 'y': 'Y', 'u': 'U', 'i': 'I', 'o': 'O', 'p': 'P',
536+
'q': 'Q', 'w': 'W', 'e': 'E', 'r': 'R', 't': 'T', 'y': 'Y', 'u': 'U', 'i': 'I', 'o': 'O', 'p': 'P',
537537
'a': 'A', 's': 'S', 'd': 'D', 'f': 'F', 'g': 'G', 'h': 'H', 'j': 'J', 'k': 'K', 'l': 'L',
538538
';': ':', "'": '"',
539539
'z': 'Z', 'x': 'X', 'c': 'C', 'v': 'V', 'b': 'B', 'n': 'N', 'm': 'M',
@@ -876,6 +876,12 @@ <h2>查碼練習</h2>
876876

877877
// --- 新增的批量查碼與字碼練習處理邏輯 ---
878878
function updatePhraseLookup() {
879+
// 確保碼表已載入
880+
if (!currentReverseCodemap || Object.keys(currentReverseCodemap).length === 0) {
881+
console.warn('碼表尚未載入完成,請稍候。');
882+
return;
883+
}
884+
879885
const textToSearch = phraseInput.value.trim();
880886
const characters = textToSearch.split('');
881887

@@ -889,6 +895,8 @@ <h2>查碼練習</h2>
889895
for (let i = 0; i < practiceChars.length; i++) {
890896
const charBox = document.createElement('div');
891897
charBox.className = 'practice-char-box';
898+
// 顯示目標字元
899+
charBox.textContent = practiceChars[i];
892900
practiceDisplayArea.appendChild(charBox);
893901
}
894902
// 補足10個空位

0 commit comments

Comments
 (0)