簡體   English   中英

osx特立獨行的鍵盤掃描碼映射到相同的字符,而與語言映射無關

[英]osx mavericks keyboard scancodes map to the same characters independent of language map

在我的用戶個人資料中,鍵盤輸入與鍵盤語言設置無關的相同字符。

使用這四個鍵組合始終會產生相同的字符:

alt-7 {
alt-8 [
alt-9 ]
alt-0 }

我的默認布局是德語,因此應該是| { } ≠ | { } ≠

但是,即使在英文和Neo Layout上,無論是在終端還是在任何其他本機應用程序中,按鍵組合都會產生相同的四個字符。 使用屏幕鍵盤概述可顯示相同的行為。 我可以在屏幕鍵盤上看到Pipe字符,但它會鍵入大括號。

呈現正確字符的唯一應用程序是Intellij Idea 我懷疑它可能是JavaIdea可能只是直接訪問scancodes

同一台計算機上的另一個用戶帳戶沒有顯示該行為(鍵盤呈現了預期的字符),因此它必須是我的用戶配置文件所特有的。

我已經做了大量的google搜索,但是我找不到基於scancodes到字符的映射在OSX上基於用戶配置文件的工作方式。

由於能夠鍵入“ |” 性格對我至關重要,非常感謝您的幫助!

我發現了:顯然,幾年前,當我嘗試在Mac上使用Windows鍵盤鍵入VirtualMachine時確實出現了自己的問題。 真可惜

這是解決方案。 在我的主目錄中是文件〜/ Library / KeyBindings / DefaultKeyBinding.dict

帶有這樣的條目:

{
"\UF729"  = "moveToBeginningOfLine:"; /* pos1 */
"^\UF729" = "moveToBeginningOfDocument:"; /* crtl + pos1 */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"\UF72b"  = "moveToEndOfLine:"; /* end */
"^\UF72B" = "moveToEndOfDocument:"; /* ctrl + end */
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
"\UF72C"  = "pageUp:";
"\UF72D"  = "pageDown:";
"^~7" = ("insertText:", "|"); /* orig alt 7 */
"^~8" = ("insertText:", "{"); /* orig alt 8 */
"^~9" = ("insertText:", "}"); /* orig alt 9 */
"^\U00DF" = ("insertText:", "\U00BF");
"^+" = ("insertText:", "\U00B1");
"~<" = ("insertText:", "|");
"~7" = ("insertText:", "{");
"~0" = ("insertText:", "}");
"~8" = ("insertText:", "[");
"~9" = ("insertText:", "]");
"~+" = ("insertText:", "~");
"~\U00DF" = ("insertText:", "\U005C");
"~q" = ("insertText:", "@");
"^x" = "cut:";
"^c" = "copy:";
"^v" = "paste:";
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM