Skip to content

Instantly share code, notes, and snippets.

@zonuexe
Created March 9, 2012 01:47
Show Gist options
  • Save zonuexe/2004563 to your computer and use it in GitHub Desktop.
Save zonuexe/2004563 to your computer and use it in GitHub Desktop.
コンビネーションでHome/End/PgUp/PgDn

fnkeycombo.ng

特定のキー+カーソルキー(←↓↑→)のコンビネーションで Home/End/PageUp/PageDown を実現する

なんなの?

独立した Home/End/PageUp/PageDown キーよりも、ミニキーボードみたいに Fn + ←↓↑→ でタイプしたい! と思ったときにはコレ。

動く環境は?

Windows + NILScript でどうぞ。

使ひかた

var altfn = "....."; の行に、コンビネーションのためのキーを設定します。

Win キーを設定すると、Windows7 のウインドウの 最大化→元に戻る→最小化左右にフィット する機能が殺されるので注意のこと。

参考

// fnkeycombo.ng
// win2fnkey.ng [h240309.v5]
// (c)2012 Zonu(tadsan) / GPLv3'ed
(function(){
var altfn = "muhenkan";
// var altfn = "win";
var withkeys={
'Up' : 'PageUp' ,
'Down' : 'PageDown' ,
'Left' : 'Home' ,
'Right' : 'End'
};
Main.process.priority=Process.priority.high;
var keymap = {};
require('Hotstrokes').Hotstrokes.remap(
function(){
for(i in withkeys){
keymap[altfn+i] = withkeys[i];
}
return keymap;
}()
).register();
}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment