From b7628018a799338a9d8e227795d7bca0ef31bb7f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 5 May 2012 21:23:12 +0900 Subject: [PATCH 1/8] change keybind for eval --- _keysnail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_keysnail.js b/_keysnail.js index 3622b99..2732e32 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -550,7 +550,7 @@ key.setGlobalKey('C-', function () { } }, '選択中のタブを左へ'); -key.setGlobalKey('M-:', function (ev) { +key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); From 161f3331fee318bf6c051296e311704bb44ca455 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 9 May 2012 19:00:55 +0900 Subject: [PATCH 2/8] update font.conf --- fonts.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fonts.conf b/fonts.conf index 8d6178e..5c07a84 100644 --- a/fonts.conf +++ b/fonts.conf @@ -2,14 +2,19 @@ - + serif DejaVu Serif - monapo + serif + + monapo + + + sans-serif DejaVu Sans From a4fbd38633a4e470551d1ca8815fad7a190fc9e0 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 20:50:50 +0900 Subject: [PATCH 3/8] fix keyboard settings for usb keyboard --- 20-keyboard.conf | 9 +++++++++ xinitrc | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 20-keyboard.conf diff --git a/20-keyboard.conf b/20-keyboard.conf new file mode 100644 index 0000000..b34b743 --- /dev/null +++ b/20-keyboard.conf @@ -0,0 +1,9 @@ +# ln -s this /etc/X11/xorg.conf.d + +Section "InputClass" + Identifier "Keyboard Defaults" + MatchIsKeyboard "yes" +# Option "XkbModel" "acer_laptop" +# Option "XkbLayout" "jp" + Option "XkbOptions" "ctrl:nocaps,ctrl:menu_rctrl" +EndSection diff --git a/xinitrc b/xinitrc index 316ecb2..acf792a 100644 --- a/xinitrc +++ b/xinitrc @@ -1,8 +1,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first -setxkbmap -option "ctrl:nocaps" -xmodmap -e 'keycode 135 = Alt_R Meta_R' # menu key as alt +setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock' From 0400c594291ddea42a43677fb0df05654bca498e Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 21:17:27 +0900 Subject: [PATCH 4/8] add hok --- _keysnail.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 2732e32..07b620c 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -222,7 +222,8 @@ ext.add('auto-install-plugins', function(ev, arg){ 'https://raw.github.com/10sr/keysnail-plugin/master/dig-url.ks.js', 'https://raw.github.com/10sr/keysnail-plugin/master/instapaper.ks.js', 'https://raw.github.com/gist/1976942/firefox-addon-manager.ks.js', - 'https://raw.github.com/gist/1450594/mstranslator.ks.js' + 'https://raw.github.com/gist/1450594/mstranslator.ks.js', + 'https://raw.github.com/mooz/keysnail/master/plugins/hok.ks.js' ]; function inst(a){ @@ -550,14 +551,14 @@ key.setGlobalKey('C-', function () { } }, '選択中のタブを左へ'); -key.setViewKey('c', function (ev) { - command.interpreter(); -}, 'JavaScript のコードを評価'); - key.setGlobalKey('C-h', function (ev, arg) { return; }, 'ignore'); +key.setViewKey('c', function (ev) { + command.interpreter(); +}, 'JavaScript のコードを評価'); + key.setViewKey('D', function (ev, arg) { ext.exec("dig-url", arg, ev); }, 'dig url with selector', true); @@ -728,3 +729,7 @@ key.setViewKey('T', function (ev, arg) { key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); + +key.setGlobalKey('C-l', function (ev, arg) { + ext.exec('hok-start-foreground-mode', arg, ev); +}, 'Start Hit a Hint foreground mode', true); From 929a8d37c7b048de4a08c9eb89225a6af2844b0c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 22:32:05 +0900 Subject: [PATCH 5/8] misc changes --- _keysnail.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 07b620c..65a31b4 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -222,8 +222,7 @@ ext.add('auto-install-plugins', function(ev, arg){ 'https://raw.github.com/10sr/keysnail-plugin/master/dig-url.ks.js', 'https://raw.github.com/10sr/keysnail-plugin/master/instapaper.ks.js', 'https://raw.github.com/gist/1976942/firefox-addon-manager.ks.js', - 'https://raw.github.com/gist/1450594/mstranslator.ks.js', - 'https://raw.github.com/mooz/keysnail/master/plugins/hok.ks.js' + 'https://raw.github.com/gist/1450594/mstranslator.ks.js' ]; function inst(a){ @@ -479,7 +478,7 @@ ext.add("list-tab-history", function () { // ========================= Special key settings ========================== // -key.quitKey = ""; +key.quitKey = "ESC"; key.helpKey = ""; key.escapeKey = "C-q"; key.macroStartKey = ""; @@ -555,6 +554,10 @@ key.setGlobalKey('C-h', function (ev, arg) { return; }, 'ignore'); +key.setGlobalKey('C-l', function (ev, arg) { + ext.exec("hok-start-foreground-mode", arg, ev); +}, 'Start Hit a Hint foreground mode', true); + key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -730,6 +733,8 @@ key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); -key.setGlobalKey('C-l', function (ev, arg) { - ext.exec('hok-start-foreground-mode', arg, ev); -}, 'Start Hit a Hint foreground mode', true); +key.setGlobalKey('', function (ev, arg) { + let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); From bfec2c51b57c1531d2a16dc3ea4c2fb805ba76e1 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 22:37:03 +0900 Subject: [PATCH 6/8] do not use menukey as ctrl (in console menukey cant be used --- 20-keyboard.conf | 2 +- xinitrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/20-keyboard.conf b/20-keyboard.conf index b34b743..a894040 100644 --- a/20-keyboard.conf +++ b/20-keyboard.conf @@ -5,5 +5,5 @@ Section "InputClass" MatchIsKeyboard "yes" # Option "XkbModel" "acer_laptop" # Option "XkbLayout" "jp" - Option "XkbOptions" "ctrl:nocaps,ctrl:menu_rctrl" + Option "XkbOptions" "ctrl:nocaps" EndSection diff --git a/xinitrc b/xinitrc index acf792a..25e2b41 100644 --- a/xinitrc +++ b/xinitrc @@ -1,7 +1,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first -setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl" +setxkbmap -option "ctrl:nocaps" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock' From 59aee9a02ef70064c863970fbe685828441dbeff Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 00:48:24 +0900 Subject: [PATCH 7/8] change left and right keys binding --- _keysnail.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 65a31b4..b7bfe37 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -558,6 +558,12 @@ key.setGlobalKey('C-l', function (ev, arg) { ext.exec("hok-start-foreground-mode", arg, ev); }, 'Start Hit a Hint foreground mode', true); +key.setGlobalKey('', function (ev, arg) { + let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); + key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -684,14 +690,6 @@ key.setViewKey('a', function (ev, arg) { allTabs.open(); }, 'alltabs.open'); -key.setViewKey('', function (ev) { - goDoCommand("cmd_scrollPageUp"); -}, '一画面分スクロールアップ'); - -key.setViewKey('', function (ev) { - goDoCommand("cmd_scrollPageDown"); -}, '一画面スクロールダウン'); - key.setViewKey([[''], ['']], function (ev, arg) { return; }, 'ignore'); @@ -733,8 +731,10 @@ key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); -key.setGlobalKey('', function (ev, arg) { - let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); - gBrowser.focus(); - content.focus(); -}, 'コンテンツへフォーカス', true); +key.setViewKey('', function (ev) { + getBrowser().mTabContainer.advanceSelectedTab(1, true); +}, 'ひとつ右のタブへ'); + +key.setViewKey('', function (ev) { + getBrowser().mTabContainer.advanceSelectedTab(-1, true); +}, 'ひとつ左のタブへ'); From cd41e07fa5643be9e654088a11025c78dc3b645d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 01:23:20 +0900 Subject: [PATCH 8/8] revert two commit related to disabling menu_as_ctrl --- 20-keyboard.conf | 2 +- _keysnail.js | 26 +++++++++++++------------- xinitrc | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/20-keyboard.conf b/20-keyboard.conf index a894040..b34b743 100644 --- a/20-keyboard.conf +++ b/20-keyboard.conf @@ -5,5 +5,5 @@ Section "InputClass" MatchIsKeyboard "yes" # Option "XkbModel" "acer_laptop" # Option "XkbLayout" "jp" - Option "XkbOptions" "ctrl:nocaps" + Option "XkbOptions" "ctrl:nocaps,ctrl:menu_rctrl" EndSection diff --git a/_keysnail.js b/_keysnail.js index b7bfe37..65a31b4 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -558,12 +558,6 @@ key.setGlobalKey('C-l', function (ev, arg) { ext.exec("hok-start-foreground-mode", arg, ev); }, 'Start Hit a Hint foreground mode', true); -key.setGlobalKey('', function (ev, arg) { - let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); - gBrowser.focus(); - content.focus(); -}, 'コンテンツへフォーカス', true); - key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -690,6 +684,14 @@ key.setViewKey('a', function (ev, arg) { allTabs.open(); }, 'alltabs.open'); +key.setViewKey('', function (ev) { + goDoCommand("cmd_scrollPageUp"); +}, '一画面分スクロールアップ'); + +key.setViewKey('', function (ev) { + goDoCommand("cmd_scrollPageDown"); +}, '一画面スクロールダウン'); + key.setViewKey([[''], ['']], function (ev, arg) { return; }, 'ignore'); @@ -731,10 +733,8 @@ key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); -key.setViewKey('', function (ev) { - getBrowser().mTabContainer.advanceSelectedTab(1, true); -}, 'ひとつ右のタブへ'); - -key.setViewKey('', function (ev) { - getBrowser().mTabContainer.advanceSelectedTab(-1, true); -}, 'ひとつ左のタブへ'); +key.setGlobalKey('', function (ev, arg) { + let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); diff --git a/xinitrc b/xinitrc index 25e2b41..acf792a 100644 --- a/xinitrc +++ b/xinitrc @@ -1,7 +1,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first -setxkbmap -option "ctrl:nocaps" +setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock'