Describe how to use Windows(tm) keys for something useful in X.
PR: docs/16841 Submitted by: Mark Ovens <mark@ukug.uk.freebsd.org>
This commit is contained in:
parent
b8a86a79da
commit
417532d053
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6674
2 changed files with 154 additions and 4 deletions
|
@ -13,7 +13,7 @@
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.42 2000/02/18 02:27:29 jim Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.43 2000/02/24 18:28:20 jhb Exp $</pubdate>
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
||||||
|
@ -5517,7 +5517,82 @@ create a <filename>/boot/loader.conf</filename> that contains:</para>
|
||||||
<para>Now all you need is a splash screen. For that you can surf
|
<para>Now all you need is a splash screen. For that you can surf
|
||||||
on over to the gallery at <ulink URL="http://www.cslab.vt.edu/~jobaldwi/splash/">http://www.cslab.vt.edu/~jobaldwi/splash/</ulink>.</para>
|
on over to the gallery at <ulink URL="http://www.cslab.vt.edu/~jobaldwi/splash/">http://www.cslab.vt.edu/~jobaldwi/splash/</ulink>.</para>
|
||||||
|
|
||||||
</answer></qandaentry></qandaset>
|
</answer></qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>Can I use the Windows(tm) keys on my keyboard in X?</para>
|
||||||
|
</question>
|
||||||
|
|
||||||
|
<answer>
|
||||||
|
<para>Yes. All you need to do is use &man.xmodmap.1; to define what
|
||||||
|
function you wish them to perform.</para>
|
||||||
|
|
||||||
|
<para>Assuming all "Windows(tm)" keyboards are standard
|
||||||
|
then the keycodes for the 3 keys are</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>115 - Windows(tm) key, between the left-hand Ctrl and
|
||||||
|
Alt keys</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>116 - Windows(tm) key, to the right of the Alt-Gr
|
||||||
|
key</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>117 - Menu key, to the left of the right-hand Ctrl
|
||||||
|
key</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>To have the left Windows(tm) key print a comma, try
|
||||||
|
this.</para>
|
||||||
|
|
||||||
|
<screen>&prompt.root; <userinput>xmodmap -e "keycode 115 = comma"</userinput></screen>
|
||||||
|
|
||||||
|
<para>You will probably have to re-start X to see the result.</para>
|
||||||
|
|
||||||
|
<para>To have the Windows(tm) key-mappings enabled automatically
|
||||||
|
everytime you start X either put the <command>xmodmap</command>
|
||||||
|
commands in your <filename>~/.xinitrc</filename> file or,
|
||||||
|
preferably, create a file <filename>~/.xmodmaprc</filename> and
|
||||||
|
just include the <command>xmodmap</command> options, one per
|
||||||
|
line.</para>
|
||||||
|
|
||||||
|
<para>For example, I have mapped the 3 keys to be F13, F14, and F15
|
||||||
|
respectively. This makes it easy to map them to useful functions
|
||||||
|
within applications or your window manager.</para>
|
||||||
|
|
||||||
|
<para>To do this put the following in
|
||||||
|
<filename>~/.xmodmaprc</filename>.</para>
|
||||||
|
|
||||||
|
<programlisting>keycode 115 = F13
|
||||||
|
keycode 116 = F14
|
||||||
|
keycode 117 = F15</programlisting>
|
||||||
|
|
||||||
|
<para>I use <command>fvwm2</command> and have mapped the keys so
|
||||||
|
that F13 iconifies (or de-iconifies) the window the cursor is in,
|
||||||
|
F14 brings the window the cursor is in to the front or, if it is
|
||||||
|
already at the front, pushes it to the back, and F15 pops up the
|
||||||
|
main Workplace (application) menu even if the cursor is not on the
|
||||||
|
desktop, which is useful if you don't have any part of the desktop
|
||||||
|
visible (and the logo on the key matches its
|
||||||
|
functionality).</para>
|
||||||
|
|
||||||
|
<para>The entries in my <filename>~/.fvwmrc</filename> which map the
|
||||||
|
keys this way are:</para>
|
||||||
|
|
||||||
|
<programlisting>Key F13 FTIWS A Iconify
|
||||||
|
Key F14 FTIWS A RaiseLower
|
||||||
|
Key F15 A A Menu Workplace Nop</programlisting>
|
||||||
|
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
</qandaset>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter
|
<chapter
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.42 2000/02/18 02:27:29 jim Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.43 2000/02/24 18:28:20 jhb Exp $</pubdate>
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
||||||
|
@ -5517,7 +5517,82 @@ create a <filename>/boot/loader.conf</filename> that contains:</para>
|
||||||
<para>Now all you need is a splash screen. For that you can surf
|
<para>Now all you need is a splash screen. For that you can surf
|
||||||
on over to the gallery at <ulink URL="http://www.cslab.vt.edu/~jobaldwi/splash/">http://www.cslab.vt.edu/~jobaldwi/splash/</ulink>.</para>
|
on over to the gallery at <ulink URL="http://www.cslab.vt.edu/~jobaldwi/splash/">http://www.cslab.vt.edu/~jobaldwi/splash/</ulink>.</para>
|
||||||
|
|
||||||
</answer></qandaentry></qandaset>
|
</answer></qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>Can I use the Windows(tm) keys on my keyboard in X?</para>
|
||||||
|
</question>
|
||||||
|
|
||||||
|
<answer>
|
||||||
|
<para>Yes. All you need to do is use &man.xmodmap.1; to define what
|
||||||
|
function you wish them to perform.</para>
|
||||||
|
|
||||||
|
<para>Assuming all "Windows(tm)" keyboards are standard
|
||||||
|
then the keycodes for the 3 keys are</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>115 - Windows(tm) key, between the left-hand Ctrl and
|
||||||
|
Alt keys</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>116 - Windows(tm) key, to the right of the Alt-Gr
|
||||||
|
key</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>117 - Menu key, to the left of the right-hand Ctrl
|
||||||
|
key</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>To have the left Windows(tm) key print a comma, try
|
||||||
|
this.</para>
|
||||||
|
|
||||||
|
<screen>&prompt.root; <userinput>xmodmap -e "keycode 115 = comma"</userinput></screen>
|
||||||
|
|
||||||
|
<para>You will probably have to re-start X to see the result.</para>
|
||||||
|
|
||||||
|
<para>To have the Windows(tm) key-mappings enabled automatically
|
||||||
|
everytime you start X either put the <command>xmodmap</command>
|
||||||
|
commands in your <filename>~/.xinitrc</filename> file or,
|
||||||
|
preferably, create a file <filename>~/.xmodmaprc</filename> and
|
||||||
|
just include the <command>xmodmap</command> options, one per
|
||||||
|
line.</para>
|
||||||
|
|
||||||
|
<para>For example, I have mapped the 3 keys to be F13, F14, and F15
|
||||||
|
respectively. This makes it easy to map them to useful functions
|
||||||
|
within applications or your window manager.</para>
|
||||||
|
|
||||||
|
<para>To do this put the following in
|
||||||
|
<filename>~/.xmodmaprc</filename>.</para>
|
||||||
|
|
||||||
|
<programlisting>keycode 115 = F13
|
||||||
|
keycode 116 = F14
|
||||||
|
keycode 117 = F15</programlisting>
|
||||||
|
|
||||||
|
<para>I use <command>fvwm2</command> and have mapped the keys so
|
||||||
|
that F13 iconifies (or de-iconifies) the window the cursor is in,
|
||||||
|
F14 brings the window the cursor is in to the front or, if it is
|
||||||
|
already at the front, pushes it to the back, and F15 pops up the
|
||||||
|
main Workplace (application) menu even if the cursor is not on the
|
||||||
|
desktop, which is useful if you don't have any part of the desktop
|
||||||
|
visible (and the logo on the key matches its
|
||||||
|
functionality).</para>
|
||||||
|
|
||||||
|
<para>The entries in my <filename>~/.fvwmrc</filename> which map the
|
||||||
|
keys this way are:</para>
|
||||||
|
|
||||||
|
<programlisting>Key F13 FTIWS A Iconify
|
||||||
|
Key F14 FTIWS A RaiseLower
|
||||||
|
Key F15 A A Menu Workplace Nop</programlisting>
|
||||||
|
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
</qandaset>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter
|
<chapter
|
||||||
|
|
Loading…
Reference in a new issue