summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/Xmodmap.remote.template29
-rw-r--r--packaging/Xmodmap.template40
-rw-r--r--packaging/xmodmap.manifest5
-rw-r--r--packaging/xmodmap.spec52
4 files changed, 126 insertions, 0 deletions
diff --git a/packaging/Xmodmap.remote.template b/packaging/Xmodmap.remote.template
new file mode 100644
index 0000000..e907126
--- /dev/null
+++ b/packaging/Xmodmap.remote.template
@@ -0,0 +1,29 @@
+!!
+!! Xmodmap.remote: Map key san codes or key symbols of
+!! a remote X workstation or terminal.
+!!
+!! Note: for remote terminals we do not know what scan codes
+!! are used for specific keys. Therefore we have to use
+!! the symbols as representative. This may cause problems
+!! if the symbols for specific keys were swapped before.
+!!
+!! If you need the exact scan codes for different terminals and
+!! their key board copy this file to
+!! Xmodmap.<full_qualified_domain_name_of_the_terminal> where
+!! the suffix is the full qualified name identical with the
+!! value of the DISPLAY variable without `:0', `:1', ...
+!! e.g. Xmodmap.xterminal.uni-yx.de
+!!
+!! How to determine scan codes an there currently corresponding
+!! symbol see manual page of xev(1x) and xmodmap(1x).
+!!
+!! Werner Fink, <werner@suse.de>
+!!
+!! Backarrow key is symbol BackSpace
+!! Modifiers for backarrow key
+!! Shift-BS is Symbol BackSpace
+!! Alt-BS is Symbol DeleteWord
+!! Remove key is Symbol Delete
+!!
+keysym BackSpace = BackSpace BackSpace 3270_DeleteWord
+
diff --git a/packaging/Xmodmap.template b/packaging/Xmodmap.template
new file mode 100644
index 0000000..c0670cb
--- /dev/null
+++ b/packaging/Xmodmap.template
@@ -0,0 +1,40 @@
+!! ~/.Xmodmap
+!!
+!! Use this as a template for $HOME/.Xmodmap
+!!
+!! The leading `!' is the comment sign.
+!!
+!! Please note: the natural way to assign keys are their keycodes.
+!! The only problem is, that keycodes do depend on the architecture,
+!! therefore keysymbols are used herein. This has the disadvantage
+!! that this file can only be called once with the program xmodmap.
+!! To get keycodes of the keys use the program xev.
+!! The system Xmodmap is /usr/X11R6/lib/X11/Xmodmap, have a look.
+
+!! First example: Swap control key with caps lock key just like on
+!! lk401 from DEC or type 4 from Sun Microsystems
+!remove Lock = Caps_Lock
+!remove Control = Control_L
+!keysym Caps_Lock = Control_L
+!keysym Control_L = Caps_Lock
+!add Lock = Caps_Lock
+!add Control = Control_L
+
+!! Second example: Make left Alt key to left Meta key
+!! Note that afterwards no key is assigned anymore to the symbol Alt_L.
+!clear Mod1
+!keysym Alt_L = Meta_L
+!add Mod1 = Meta_L
+
+!! Third example: Change right Control key to Compose key.
+!! To do Compose Character, press this key and afterwards two
+!! characters (e.g. `a' and `^' to get â).
+!remove Control = Control_R
+!keysym Control_R = Multi_key
+!add Control = Control_R
+
+!! Fourth example: Make Menu key on WIN95 keyboard doing Compose
+!keysym Menu = Multi_key
+
+!!
+!! End of ~/.Xmodmap
diff --git a/packaging/xmodmap.manifest b/packaging/xmodmap.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/xmodmap.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/xmodmap.spec b/packaging/xmodmap.spec
new file mode 100644
index 0000000..124b9f7
--- /dev/null
+++ b/packaging/xmodmap.spec
@@ -0,0 +1,52 @@
+%bcond_with x
+
+Name: xmodmap
+Version: 1.0.8
+Release: 0
+License: MIT
+Summary: Utility to modify keymaps and pointer button mappings in X
+Url: http://xorg.freedesktop.org/
+Group: System/X11/Utilities
+Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
+Source1: Xmodmap.template
+Source2: Xmodmap.remote.template
+Source1001: xmodmap.manifest
+BuildRequires: pkg-config
+
+%if %{with x}
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xorg-macros) >= 1.8
+BuildRequires: pkgconfig(xproto) >= 7.0.17
+%else
+ExclusiveArch:
+%endif
+
+
+%description
+The xmodmap program is used to edit and display the keyboard modifier
+map and keymap table that are used by client applications to convert
+event keycodes into keysyms. It is usually run from the user's
+session startup script to configure the keyboard according to personal
+tastes.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%autogen
+make %{?_smp_mflags}
+
+%install
+%make_install
+install -m0644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/Xmodmap
+install -m0644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/Xmodmap.remote
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%license COPYING
+%config %{_sysconfdir}/X11/Xmodmap
+%config %{_sysconfdir}/X11/Xmodmap.remote
+%{_bindir}/xmodmap
+%{_mandir}/man1/xmodmap.1%{?ext_man}