mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Add ability to generate man page describing key code names & values
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
02fb15fb60
commit
e6c3b59c19
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
*#*#
|
*#*#
|
||||||
*.#*#
|
*.#*#
|
||||||
*.[18]
|
*.[187]
|
||||||
*.[18].in
|
*.[187].in
|
||||||
*.a
|
*.a
|
||||||
*.cov
|
*.cov
|
||||||
*.exe
|
*.exe
|
||||||
|
@ -1777,6 +1777,7 @@ exit 0
|
|||||||
%{_mandir}/man8/libvirtd.8*
|
%{_mandir}/man8/libvirtd.8*
|
||||||
%{_mandir}/man8/virtlogd.8*
|
%{_mandir}/man8/virtlogd.8*
|
||||||
%{_mandir}/man8/virtlockd.8*
|
%{_mandir}/man8/virtlockd.8*
|
||||||
|
%{_mandir}/man7/virkey*.7*
|
||||||
|
|
||||||
%doc examples/polkit/*.rules
|
%doc examples/polkit/*.rules
|
||||||
|
|
||||||
|
@ -259,6 +259,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
|
|||||||
%{mingw32_mandir}/man1/virt-admin.1*
|
%{mingw32_mandir}/man1/virt-admin.1*
|
||||||
%{mingw32_mandir}/man1/virt-xml-validate.1*
|
%{mingw32_mandir}/man1/virt-xml-validate.1*
|
||||||
%{mingw32_mandir}/man1/virt-pki-validate.1*
|
%{mingw32_mandir}/man1/virt-pki-validate.1*
|
||||||
|
%{mingw32_mandir}/man7/virkey*.7*
|
||||||
|
|
||||||
%files -n mingw32-libvirt-static
|
%files -n mingw32-libvirt-static
|
||||||
%{mingw32_libdir}/libvirt.a
|
%{mingw32_libdir}/libvirt.a
|
||||||
@ -343,6 +344,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
|
|||||||
%{mingw64_mandir}/man1/virt-admin.1*
|
%{mingw64_mandir}/man1/virt-admin.1*
|
||||||
%{mingw64_mandir}/man1/virt-xml-validate.1*
|
%{mingw64_mandir}/man1/virt-xml-validate.1*
|
||||||
%{mingw64_mandir}/man1/virt-pki-validate.1*
|
%{mingw64_mandir}/man1/virt-pki-validate.1*
|
||||||
|
%{mingw64_mandir}/man7/virkey*.7*
|
||||||
|
|
||||||
%files -n mingw64-libvirt-static
|
%files -n mingw64-libvirt-static
|
||||||
%{mingw64_libdir}/libvirt.a
|
%{mingw64_libdir}/libvirt.a
|
||||||
|
@ -52,6 +52,8 @@ AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
|
|||||||
$(MINGW_EXTRA_LDFLAGS) \
|
$(MINGW_EXTRA_LDFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
|
||||||
|
|
||||||
EXTRA_DIST = $(conf_DATA)
|
EXTRA_DIST = $(conf_DATA)
|
||||||
|
|
||||||
BUILT_SOURCES =
|
BUILT_SOURCES =
|
||||||
@ -219,6 +221,36 @@ util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
|||||||
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
|
||||||
mv $@-tmp $@ || rm -f $@-tmp
|
mv $@-tmp $@ || rm -f $@-tmp
|
||||||
|
|
||||||
|
util/virkeycode-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
||||||
|
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
|
||||||
|
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycode-,,' \
|
||||||
|
-e 's,\.pod,,'` && \
|
||||||
|
$(MKDIR_P) util/ && \
|
||||||
|
$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
|
||||||
|
--lang pod --varname "Key code values for $$NAME" code-docs \
|
||||||
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
|
||||||
|
$@-tmp && mv $@-tmp $@ || rm $@-tmp
|
||||||
|
|
||||||
|
util/virkeyname-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
||||||
|
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
|
||||||
|
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeyname-,,' \
|
||||||
|
-e 's,\.pod,,'` && \
|
||||||
|
$(MKDIR_P) util/ && \
|
||||||
|
$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
|
||||||
|
--lang pod --varname "Key name values for $$NAME" name-docs \
|
||||||
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
|
||||||
|
$@-tmp && mv $@-tmp $@ || rm $@-tmp
|
||||||
|
|
||||||
|
util/virkey%.7: util/virkey%.pod
|
||||||
|
$(AM_V_GEN)$(POD2MAN) --section=7 $< $@-t1 && \
|
||||||
|
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
|
||||||
|
sed \
|
||||||
|
-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
|
||||||
|
-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
|
||||||
|
< $@-t1 > $@-t2 && \
|
||||||
|
rm -f $@-t1 && \
|
||||||
|
mv $@-t2 $@
|
||||||
|
|
||||||
KEYCODES = linux osx atset1 atset2 atset3 xt xtkbd usb win32 rfb
|
KEYCODES = linux osx atset1 atset2 atset3 xt xtkbd usb win32 rfb
|
||||||
KEYNAMES = linux osx win32
|
KEYNAMES = linux osx win32
|
||||||
|
|
||||||
@ -227,9 +259,16 @@ KEYTABLES = \
|
|||||||
$(KEYNAMES:%=util/virkeynametable_%.h) \
|
$(KEYNAMES:%=util/virkeynametable_%.h) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
KEYPODS = $(KEYCODES:%=util/virkeycode-%.pod) \
|
||||||
|
$(KEYNAMES:%=util/virkeyname-%.pod)
|
||||||
|
KEYMANS = $(KEYPODS:%.pod=%.7)
|
||||||
|
|
||||||
|
man7_MANS = $(KEYMANS)
|
||||||
|
|
||||||
UTIL_SOURCES += $(KEYTABLES)
|
UTIL_SOURCES += $(KEYTABLES)
|
||||||
BUILT_SOURCES += $(KEYTABLES)
|
BUILT_SOURCES += $(KEYTABLES)
|
||||||
MAINTAINERCLEANFILES += $(KEYTABLES)
|
MAINTAINERCLEANFILES += $(KEYTABLES)
|
||||||
|
CLEANFILES += $(KEYMANS) $(KEYPODS)
|
||||||
|
|
||||||
# Internal generic driver infrastructure
|
# Internal generic driver infrastructure
|
||||||
DATATYPES_SOURCES = datatypes.h datatypes.c
|
DATATYPES_SOURCES = datatypes.h datatypes.c
|
||||||
@ -2834,8 +2873,6 @@ virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status
|
|||||||
chmod a+x $@-t && \
|
chmod a+x $@-t && \
|
||||||
mv $@-t $@
|
mv $@-t $@
|
||||||
|
|
||||||
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
|
|
||||||
|
|
||||||
virtlockd.8.in: locking/virtlockd.pod
|
virtlockd.8.in: locking/virtlockd.pod
|
||||||
$(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \
|
$(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \
|
||||||
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
|
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
|
||||||
|
@ -2082,11 +2082,15 @@ The numeric values are those defined by the Linux generic input
|
|||||||
event subsystem. The symbolic names match the corresponding
|
event subsystem. The symbolic names match the corresponding
|
||||||
Linux key constant macro names.
|
Linux key constant macro names.
|
||||||
|
|
||||||
|
See L<virkeycode-linux(7)> and L<virkeyname-linux(7)>
|
||||||
|
|
||||||
=item B<xt>
|
=item B<xt>
|
||||||
|
|
||||||
The numeric values are those defined by the original XT keyboard
|
The numeric values are those defined by the original XT keyboard
|
||||||
controller. No symbolic names are provided
|
controller. No symbolic names are provided
|
||||||
|
|
||||||
|
See L<virkeycode-xt(7)>
|
||||||
|
|
||||||
=item B<atset1>
|
=item B<atset1>
|
||||||
|
|
||||||
The numeric values are those defined by the AT keyboard controller,
|
The numeric values are those defined by the AT keyboard controller,
|
||||||
@ -2094,22 +2098,30 @@ set 1 (aka XT compatible set). Extended keycoes from B<atset1>
|
|||||||
may differ from extended keycodes in the B<xt> codeset. No symbolic
|
may differ from extended keycodes in the B<xt> codeset. No symbolic
|
||||||
names are provided
|
names are provided
|
||||||
|
|
||||||
|
See L<virkeycode-atset1(7)>
|
||||||
|
|
||||||
=item B<atset2>
|
=item B<atset2>
|
||||||
|
|
||||||
The numeric values are those defined by the AT keyboard controller,
|
The numeric values are those defined by the AT keyboard controller,
|
||||||
set 2. No symbolic names are provided
|
set 2. No symbolic names are provided
|
||||||
|
|
||||||
|
See L<virkeycode-atset2(7)>
|
||||||
|
|
||||||
=item B<atset3>
|
=item B<atset3>
|
||||||
|
|
||||||
The numeric values are those defined by the AT keyboard controller,
|
The numeric values are those defined by the AT keyboard controller,
|
||||||
set 3 (aka PS/2 compatible set). No symbolic names are provided
|
set 3 (aka PS/2 compatible set). No symbolic names are provided
|
||||||
|
|
||||||
|
See L<virkeycode-atset3(7)>
|
||||||
|
|
||||||
=item B<os_x>
|
=item B<os_x>
|
||||||
|
|
||||||
The numeric values are those defined by the OS-X keyboard input
|
The numeric values are those defined by the OS-X keyboard input
|
||||||
subsystem. The symbolic names match the corresponding OS-X key
|
subsystem. The symbolic names match the corresponding OS-X key
|
||||||
constant macro names
|
constant macro names
|
||||||
|
|
||||||
|
See L<virkeycode-osx(7)> and L<virkeyname-osx(7)>
|
||||||
|
|
||||||
=item B<xt_kbd>
|
=item B<xt_kbd>
|
||||||
|
|
||||||
The numeric values are those defined by the Linux KBD device.
|
The numeric values are those defined by the Linux KBD device.
|
||||||
@ -2117,17 +2129,23 @@ These are a variant on the original XT codeset, but often with
|
|||||||
different encoding for extended keycodes. No symbolic names are
|
different encoding for extended keycodes. No symbolic names are
|
||||||
provided.
|
provided.
|
||||||
|
|
||||||
|
See L<virkeycode-xtkbd(7)>
|
||||||
|
|
||||||
=item B<win32>
|
=item B<win32>
|
||||||
|
|
||||||
The numeric values are those defined by the Win32 keyboard input
|
The numeric values are those defined by the Win32 keyboard input
|
||||||
subsystem. The symbolic names match the corresponding Win32 key
|
subsystem. The symbolic names match the corresponding Win32 key
|
||||||
constant macro names
|
constant macro names
|
||||||
|
|
||||||
|
See L<virkeycode-win32(7)> and L<virkeyname-win32(7)>
|
||||||
|
|
||||||
=item B<usb>
|
=item B<usb>
|
||||||
|
|
||||||
The numeric values are those defined by the USB HID specification
|
The numeric values are those defined by the USB HID specification
|
||||||
for keyboard input. No symbolic names are provided
|
for keyboard input. No symbolic names are provided
|
||||||
|
|
||||||
|
See L<virkeycode-usb(7)>
|
||||||
|
|
||||||
=item B<rfb>
|
=item B<rfb>
|
||||||
|
|
||||||
The numeric values are those defined by the RFB extension for sending
|
The numeric values are those defined by the RFB extension for sending
|
||||||
@ -2135,6 +2153,8 @@ raw keycodes. These are a variant on the XT codeset, but extended
|
|||||||
keycodes have the low bit of the second byte set, instead of the high
|
keycodes have the low bit of the second byte set, instead of the high
|
||||||
bit of the first byte. No symbolic names are provided.
|
bit of the first byte. No symbolic names are provided.
|
||||||
|
|
||||||
|
See L<virkeycode-rfb(7)>
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
B<Examples>
|
B<Examples>
|
||||||
|
Loading…
Reference in New Issue
Block a user