特殊:Badtitle/NS100:HowToVirtualKeyboardKeymapping:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
无编辑摘要
Wikibot留言 | 贡献
无编辑摘要
第2行: 第2行:
{{Languages|UbuntuHelp:HowToVirtualKeyboardKeymapping}}
{{Languages|UbuntuHelp:HowToVirtualKeyboardKeymapping}}
Virtual Keyboard (aka VKey``Bd) has a very restricted set of keymappings by default.
Virtual Keyboard (aka VKey``Bd) has a very restricted set of keymappings by default.
You can change this easily by editing the ~/.vkeybdmap file.
You can change this easily by editing the ~/.vkeybdmap file.
The way it works is that it lists each keysym of the keyboard along with the corresponding note number to map to this key. You can figure out the keysym of any given key by installing and running the xkeycaps application:
The way it works is that it lists each keysym of the keyboard along with the corresponding note number to map to this key. You can figure out the keysym of any given key by installing and running the xkeycaps application:
<pre><nowiki>
<pre><nowiki>
第10行: 第8行:
xkeycaps
xkeycaps
</nowiki></pre>
</nowiki></pre>
Here is a sample of a fully-configured virtual keyboard, spanning over 3 octaves range:
Here is a sample of a fully-configured virtual keyboard, spanning over 3 octaves range:
<pre><nowiki>
<pre><nowiki>
global keymap
global keymap
第62行: 第58行:
}
}
</nowiki></pre>
</nowiki></pre>
Download this file: https://help.ubuntu.com/community/vkeybdmap and save it as ~?action=AttachFile&do=get&target=.vkeybdmap
Download this file: https://help.ubuntu.com/community/vkeybdmap and save it as ~?action=AttachFile&do=get&target=.vkeybdmap
This mapping may not be perfect for your needs, but it should serve as a good starting point for you.
This mapping may not be perfect for your needs, but it should serve as a good starting point for you.
Once you have mapped all the keys how you want, be sure to start VKey``Bd with the maximum number of octaves, or else you will get weird errors when pressing keys that are not shown on screen:
Once you have mapped all the keys how you want, be sure to start VKey``Bd with the maximum number of octaves, or else you will get weird errors when pressing keys that are not shown on screen:
<pre><nowiki>
<pre><nowiki>
vkeybd --octave 9
vkeybd --octave 9
</nowiki></pre>
</nowiki></pre>
Test it out, and it should be working perfectly. If you want to make the default state of VKey``Bd to open up with 9 octaves, go to ''File > Save Config'' and now you do not need to specify the --octave parameter anymore.
Test it out, and it should be working perfectly. If you want to make the default state of VKey``Bd to open up with 9 octaves, go to ''File > Save Config'' and now you do not need to specify the --octave parameter anymore.
That's all there is to it.
That's all there is to it.


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2007年11月30日 (五) 17:45的版本

{{#ifexist: :HowToVirtualKeyboardKeymapping/zh | | {{#ifexist: HowToVirtualKeyboardKeymapping/zh | | {{#ifeq: {{#titleparts:HowToVirtualKeyboardKeymapping|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:HowToVirtualKeyboardKeymapping|1|-1|}} | zh | | }}

Virtual Keyboard (aka VKey``Bd) has a very restricted set of keymappings by default. You can change this easily by editing the ~/.vkeybdmap file. The way it works is that it lists each keysym of the keyboard along with the corresponding note number to map to this key. You can figure out the keysym of any given key by installing and running the xkeycaps application:

sudo apt-get install xkeycaps
xkeycaps

Here is a sample of a fully-configured virtual keyboard, spanning over 3 octaves range:

global keymap
set keymap {
{a 8}
{z 9}
{s 10}
{x 11}
{c 12}
{f 13}
{v 14}
{g 15}
{b 16}
{n 17}
{j 18}
{m 19}
{k 20}
{comma 21}
{l 22}
{period 23}
{slash 24}
{apostrophe 25}
{Shift_R 26}
{Return 27}
{Tab 24}
{1 25}
{q 26}
{2 27}
{w 28}
{e 29}
{4 30}
{r 31}
{5 32}
{t 33}
{6 34}
{y 35}
{u 36}
{8 37}
{i 38}
{9 39}
{o 40}
{p 41}
{minus 42}
{bracketleft 43}
{equal 44}
{bracketright 45}
{BackSpace 46}
{backslash 47}
}

Download this file: https://help.ubuntu.com/community/vkeybdmap and save it as ~?action=AttachFile&do=get&target=.vkeybdmap This mapping may not be perfect for your needs, but it should serve as a good starting point for you. Once you have mapped all the keys how you want, be sure to start VKey``Bd with the maximum number of octaves, or else you will get weird errors when pressing keys that are not shown on screen:

vkeybd --octave 9

Test it out, and it should be working perfectly. If you want to make the default state of VKey``Bd to open up with 9 octaves, go to File > Save Config and now you do not need to specify the --octave parameter anymore. That's all there is to it.