debian/0000755000000000000000000000000011750572244007175 5ustar debian/compat0000644000000000000000000000000211616003313010356 0ustar 7 debian/README.Debian0000644000000000000000000000144111621437074011234 0ustar This is a shortened version of the original README file supplied with KBDD's source. Running kbdd ----------- To run kbdd you can just run '/usr/bin/kbdd' to use kbdd in daemon mode, or use '/usr/bin/kbdd -n' to run in verbose mode. More info --------------- You can go to kbdd wiki to check use cases described there: http://github.com/qnikst/kbdd/wiki/Usecases Known bugs --------------- * Sometimes meta4 key lips in awesome, this bug was never reproduced anywhere but on one host. Troubleshooting --------------- All bugs and issues can be posted to http://github.com/qnikst/kbdd/issues or sent to jabber: qnikst@gentoo.ru The Debian-related bugs should be reported to Debian's BTS (with reportbug) or directly to the package maintainer Stanislav Maslovski debian/watch0000644000000000000000000000011511621023364010212 0ustar version=3 https://github.com/qnikst/kbdd/downloads .*/kbdd-(.*)\.tar\.bz2 debian/copyright0000644000000000000000000000247011616012070011116 0ustar This work was packaged for Debian by: Stanislav Maslovski on Tue, 02 Aug 2011 18:16:26 +0400 It was downloaded from: https://github.com/qnikst/kbdd Upstream Authors: Alexander V Vershilov Maxim Koltsov Copyright: Copyright (C) 2010 Alexander V Vershilov and collaborators License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". The Debian packaging is: Copyright (C) 2011 Stanislav Maslovski and is licensed under the GPL version 2, see above. debian/control0000644000000000000000000000246311750362732010604 0ustar Source: kbdd Section: x11 Priority: extra Maintainer: Stanislav Maslovski Build-Depends: debhelper (>= 7.0.50~), autotools-dev, libx11-dev, libglib2.0-dev, libdbus-glib-1-dev Standards-Version: 3.9.3 Homepage: https://github.com/qnikst/kbdd Package: kbdd Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, dbus-x11 Description: Per-window keyboard layout switching daemon for X KBDD stands for keyboard daemon. It is a simple keyboard layout switching program, which is designed to run in an X11 session and remember keyboard layouts on a per-window basis. That can be very handy for a user of a non-US keyboard who does not want to jump through layouts back and forth while typing in terminals (mostly in latin) and some kind of chat (in native language). Another useful thing about KBDD is its D-Bus notification support — it can emit signals on layout change, thus, making it possible to create layout indicator widgets in such window managers as awesome, for example. . Users of popular desktop environments such as GNOME or KDE most likely do not need this package, as a similar functionality should be already available within their environment. This package may be of interest, however, for the users of tiling or dynamic window managers such as dwm or awesome. debian/menu0000644000000000000000000000016011616007270010052 0ustar ?package(kbdd):needs="X11" section="Applications/System/Administration"\ title="kbdd" command="/usr/bin/kbdd" debian/changelog0000644000000000000000000000203011750363236011041 0ustar kbdd (0.6-4) unstable; urgency=low * debian/patches: - add group-lost-on-focus-change-fix patch (Closes: #644661). * debian/rules: - allow for a debug build. * debian/control - amend debhelper dependency to >= 7.0.50~. -- Stanislav Maslovski Thu, 03 May 2012 05:57:47 +0400 kbdd (0.6-3) unstable; urgency=low * debian/patches: - add glib-headers-fix patch to fix FTBFS with glib >= 2.31 (Closes: #665562). * debian/control: - bump Standards-Version to 3.9.3. -- Stanislav Maslovski Sun, 25 Mar 2012 01:45:39 +0400 kbdd (0.6-2) unstable; urgency=low * debian/control: - add missing dependency on dbus-x11 (Closes: #638947). * debian/patches: - add man-page-fixes patch. -- Stanislav Maslovski Sat, 27 Aug 2011 15:57:39 +0400 kbdd (0.6-1) unstable; urgency=low * Initial release (Closes: #636262). -- Stanislav Maslovski Tue, 02 Aug 2011 18:16:26 +0400 debian/rules0000755000000000000000000000022711750361675010262 0ustar #!/usr/bin/make -f %: dh $@ ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) override_dh_auto_configure: dh_auto_configure -- --enable-debug endif debian/patches/0000755000000000000000000000000011750557265010632 5ustar debian/patches/glib-headers-fix0000644000000000000000000000062511733436773013673 0ustar Index: kbdd-0.6/src/kbdd.c =================================================================== --- kbdd-0.6.orig/src/kbdd.c 2011-08-07 05:52:34.000000000 +0400 +++ kbdd-0.6/src/kbdd.c 2012-03-25 01:34:35.960036694 +0400 @@ -33,7 +33,6 @@ #ifdef ENABLE_DBUS #include #include -#include #include "dbus/m-kbdd-service.h" #include "dbus/kbdd-service-glue.h" #endif debian/patches/group-lost-on-focus-change-fix0000644000000000000000000000472611750557265016437 0ustar Index: kbdd-0.6/src/libkbdd.c =================================================================== --- kbdd-0.6.orig/src/libkbdd.c 2011-08-07 05:52:34.000000000 +0400 +++ kbdd-0.6/src/libkbdd.c 2012-05-03 23:37:53.500001008 +0400 @@ -264,15 +264,10 @@ Window focused_win; if (ev->window == _kbdd.focus_win) return; - - if ( (ev->mode == NotifyGrab) ) { - focused_win = ev->window; - } else { - _kbdd_focus_window(ev->window); - dbg("focus event %u", (uint32_t)ev->window); - int revert; - XGetInputFocus(ev->display, &focused_win, &revert); - } + _kbdd_focus_window(ev->window); + dbg("focus event %u", (uint32_t)ev->window); + int revert; + XGetInputFocus(ev->display, &focused_win, &revert); kbdd_set_window_layout(ev->display, /*ev->window);*/ focused_win); XSync(ev->display, 0); } @@ -322,12 +317,17 @@ { case XkbStateNotify: dbg( "LIBKBDD state notify event\n"); - uint32_t grp = ev.state.group; - Window focused_win; - int revert; - XGetInputFocus( ev.any.display, &focused_win, &revert); - if (grp == ev.state.locked_group) //do not save layout with modifier - _kbdd_update_window_layout( focused_win, grp); + if (ev.state.keycode) { + dbg("... state change due to a key press, processing ..."); + uint32_t grp = ev.state.group; + Window focused_win; + int revert; + XGetInputFocus( ev.any.display, &focused_win, &revert); + if (grp == ev.state.locked_group) //do not save layout with modifier + _kbdd_update_window_layout( focused_win, grp); + } else { + dbg("... programmatic event, skipping ..."); + } break; case XkbNewKeyboardNotify: dbg("kbdnotify %u\n",ev.any.xkb_type); @@ -442,12 +442,8 @@ Window focused_win; int revert; if ( XGetInputFocus( _kbdd.display, &focused_win, &revert) ) - { - if (_kbdd.focus_win == focused_win ) //this hack will not save us in case ok KDE+Awesome - _kbdd_perwindow_put(focused_win, layout); - //else - XkbLockGroup( _kbdd.display, XkbUseCoreKbd, layout); - } + if ( XkbLockGroup( _kbdd.display, XkbUseCoreKbd, layout) ) + _kbdd_update_window_layout(focused_win, layout); dbg("set window layout %u",layout); } debian/patches/man-page-fixes0000644000000000000000000000701011626155521013343 0ustar Index: kbdd-0.6/kbdd.1 =================================================================== --- kbdd-0.6.orig/kbdd.1 2011-08-27 13:07:25.126569125 +0400 +++ kbdd-0.6/kbdd.1 2011-08-27 15:55:53.244037057 +0400 @@ -1,47 +1,82 @@ -.TH KBDD 1 "OCT 2010" Linux "User Manual" -.SH NAME kbdd - simple per-window keyboard layout daemon +.TH KBDD 1 "27 Aug 2011" "version 0.6" "XKB layout switching daemon" +.SH NAME +kbdd - simple per-window keyboard layout switching daemon .SH SYNOPSIS .B kbdd -.RB [ \-v ] +.RB "[ " \-n " | " \-\-nodaemon " ]" +.br +.B kbdd +.RB "[ " \-h " | " \-\-help " ] [ " \-v " | " \-\-version " ]" .SH DESCRIPTION -kbdd is a simple per-window keyboard layout daemon. It can be run via -a shell. Kbdd has dbus interface for notifying about layout change and -listening for incoming requests. - -kbbd has dbus interface with next methods: +kbdd is a simple keyboard layout daemon that switches and restores +layouts on a per-window basis. +.TP +.BR \-n ", " \-\-nodaemon +run in nodaemon (foreground) mode +.TP +.BR \-h ", " \-\-help +print a short usage summary +.TP +.BR \-v ", " \-\-version +print the program version +.SH DBUS INTERFACE +Kbdd registers a dbus interface in order to notify a window manager +about layout change and listens on this interface for incoming requests. +This interface can be used in WM widgets to indicate the current layout. +.P +The dbus interface has the following methods: .TP .B getLayoutName( uint32 ) -returns string presentation of group name +returns a string representing the layout group name .TP -.B set_layout(uint32 ) -set current group +.B set_layout( uint32 ) +sets current group .TP .B getCurrentLayout -get current group id +returns current layout group id .TP -.B next_layout -switch to the next keyboard layout +.B next_layout +switches to the next keyboard layout .TP .B prev_layout -switch to the previous keyboard layout - -and events(signals): - +switches to the previous keyboard layout +.P +The following events (signals) are available: .TP .B layoutChanged returns new group number .TP .B layoutNameChanged returns name for the new group - -so you can change encoding with dbus-send command: - dbus-send --dest=ru.gentoo.KbddService /ru/gentoo/KbddService ru.gentoo.kbdd.set_layout uint32:1 -To get more information about kbdd usage you can visit -https://github.com/qnikst/kbdd/wiki/Usecases page - +.P +You can change the layout with the following dbus-send command: +.EX +.B dbus-send \-\-dest=ru.gentoo.KbddService /ru/gentoo/KbddService ru.gentoo.kbdd.set_layout uint32:1 +.EE .SH BUGS -For some users meta-keys (like alt or Meta4 stick) but there is not enough -report data to investigate if this a kbdd bug or not. -If you find any bug please report to http://github.com/qnikst/kbdd/issues +Some users reported problems with sticking meta-keys +(Alt or Meta4), however, at the moment there is not +enough information collected to conclude +if this is caused by kbdd or not. +.P +Newly found bugs may be reported on +.UR http://github.com/qnikst/kbdd/issues +the project page at github +.UE . .SH AUTORS -Alexander V. Vershilov +.MT alexander.vershilov@gmail.com +Alexander V. Vershilov +.ME +.P +This manual page was updated for the Debian project by +.MT stanislav.maslovski@gmail.com +Stanislav Maslovski +.ME +.SH SEE ALSO +.IR dbus-send (1), +.IR dbus-monitor (1) +.P +You can get more information about kbdd usage on +.UR https://github.com/qnikst/kbdd/wiki/Usecases +wiki pages of the kbdd project +.UE . debian/patches/series0000644000000000000000000000007711750316714012043 0ustar man-page-fixes glib-headers-fix group-lost-on-focus-change-fix debian/source/0000755000000000000000000000000011616003313010460 5ustar debian/source/format0000644000000000000000000000001411616003313011666 0ustar 3.0 (quilt)