summaryrefslogtreecommitdiffstats
path: root/kcontrol/keys
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/keys')
-rw-r--r--kcontrol/keys/CMakeLists.txt43
-rw-r--r--kcontrol/keys/ChangeLog26
-rw-r--r--kcontrol/keys/Makefile.am22
-rw-r--r--kcontrol/keys/README7
-rw-r--r--kcontrol/keys/commandShortcuts.cpp243
-rw-r--r--kcontrol/keys/commandShortcuts.h75
-rwxr-xr-xkcontrol/keys/convertShortcuts.pl58
-rw-r--r--kcontrol/keys/kde4.kksrc192
-rw-r--r--kcontrol/keys/keyconfig.cpp545
-rw-r--r--kcontrol/keys/keyconfig.h90
-rw-r--r--kcontrol/keys/keys.desktop239
-rw-r--r--kcontrol/keys/khotkeys.cpp121
-rw-r--r--kcontrol/keys/khotkeys.h41
-rw-r--r--kcontrol/keys/mac4.kksrc197
-rw-r--r--kcontrol/keys/main.cpp220
-rw-r--r--kcontrol/keys/main.h59
-rw-r--r--kcontrol/keys/modifiers.cpp355
-rw-r--r--kcontrol/keys/modifiers.h49
-rw-r--r--kcontrol/keys/shortcuts.cpp492
-rw-r--r--kcontrol/keys/shortcuts.h81
-rw-r--r--kcontrol/keys/tdeaccel.upd3
-rw-r--r--kcontrol/keys/tdeaccelaction.h205
-rw-r--r--kcontrol/keys/treeview.cpp282
-rw-r--r--kcontrol/keys/treeview.h84
-rw-r--r--kcontrol/keys/trinity.kksrc193
-rw-r--r--kcontrol/keys/unix3.kksrc198
-rw-r--r--kcontrol/keys/win3.kksrc198
-rw-r--r--kcontrol/keys/win4.kksrc198
-rw-r--r--kcontrol/keys/wm3.kksrc188
29 files changed, 4704 insertions, 0 deletions
diff --git a/kcontrol/keys/CMakeLists.txt b/kcontrol/keys/CMakeLists.txt
new file mode 100644
index 000000000..3e58f720d
--- /dev/null
+++ b/kcontrol/keys/CMakeLists.txt
@@ -0,0 +1,43 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+##### other data ################################
+
+install( FILES keys.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+install( FILES tdeaccel.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
+install( PROGRAMS convertShortcuts.pl DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
+
+install( FILES
+ wm3.kksrc trinity.kksrc kde4.kksrc win3.kksrc
+ win4.kksrc mac4.kksrc unix3.kksrc
+ DESTINATION ${DATA_INSTALL_DIR}/kcmkeys )
+
+
+##### kcm_keys (module) #########################
+
+tde_add_kpart( kcm_keys AUTOMOC
+ SOURCES
+ shortcuts.cpp modifiers.cpp main.cpp khotkeys.cpp
+ treeview.cpp commandShortcuts.cpp
+ LINK tdeio-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/kcontrol/keys/ChangeLog b/kcontrol/keys/ChangeLog
new file mode 100644
index 000000000..da787a8c6
--- /dev/null
+++ b/kcontrol/keys/ChangeLog
@@ -0,0 +1,26 @@
+1999-08-19 Duncan Haldane <duncan@kde.org>
+ * removed left-over commented out code from change
+ decribed below, and adjusted help doc names to
+ index-1.html
+
+1999-02-28 Duncan Haldane <duncan@kde.org>
+ * commented out those unnecessary debug calls.
+ in keyconfig.cpp
+
+1998-12-19 Duncan Haldane <f.d.m.haldane@cwix.com>
+ * Converted global.cpp, global.h to keyconfig.cpp,
+ keyconfig.h, that can now be used to configure both
+ the standard keys and the global keys
+ in the same sophisticated manner as
+ global.cpp did for just the global keys.
+ * converted main.cpp to use keyconfig.cpp rather than
+ global.cpp and standard.cpp for standard and globall
+ key configuration. TDEGlobalConfig and KStdConfig disappear.
+ (TDEGlobalConfig is renamed to KKeyConfig)
+ * appropriate changes to Makefile.am.
+ * standard key binding are now #include'd from
+ stdbindings.cpp
+ * standard.cpp, standard.h are left here for now.
+ The entries that used to use them in main.cpp and
+ Makefile.am are just commented out for now.
+ \ No newline at end of file
diff --git a/kcontrol/keys/Makefile.am b/kcontrol/keys/Makefile.am
new file mode 100644
index 000000000..2a6fc4ab1
--- /dev/null
+++ b/kcontrol/keys/Makefile.am
@@ -0,0 +1,22 @@
+kde_module_LTLIBRARIES = kcm_keys.la
+
+kcm_keys_la_SOURCES = shortcuts.cpp modifiers.cpp main.cpp khotkeys.cpp treeview.cpp commandShortcuts.cpp
+kcm_keys_la_LIBADD = -ltdeui -ltdeio
+kcm_keys_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
+
+AM_CPPFLAGS= $(all_includes)
+
+METASOURCES = AUTO
+
+messages:
+ customkeys=`grep "^.include .\.\." keyconfig.cpp | sed -e "s#.*\"\(.*\)\"#\1#"` ;\
+ $(XGETTEXT) $(kcm_keys_la_SOURCES) $$customkeys -o $(podir)/kcmkeys.pot
+
+update_DATA = tdeaccel.upd
+update_SCRIPTS = convertShortcuts.pl
+updatedir = $(kde_datadir)/tdeconf_update
+
+xdg_apps_DATA = keys.desktop
+
+scheme_DATA = wm3.kksrc trinity.kksrc kde4.kksrc win3.kksrc win4.kksrc mac4.kksrc unix3.kksrc
+schemedir = $(kde_datadir)/kcmkeys
diff --git a/kcontrol/keys/README b/kcontrol/keys/README
new file mode 100644
index 000000000..bbdc72537
--- /dev/null
+++ b/kcontrol/keys/README
@@ -0,0 +1,7 @@
+CHANGES V0.2
+- Global keys stored by default in ~/.trinity/share/config/kdeglobals
+ [Global Keys] group
+- KKeyDialog checks new key choices against exising bindings for the widget
+and against entries in .tderc [Global Keys]
+- kcmkeys now has two standard kcontrol pages - one for standard desktop
+accelerators and one for global keybindings.
diff --git a/kcontrol/keys/commandShortcuts.cpp b/kcontrol/keys/commandShortcuts.cpp
new file mode 100644
index 000000000..4ae379a50
--- /dev/null
+++ b/kcontrol/keys/commandShortcuts.cpp
@@ -0,0 +1,243 @@
+/*
+ * commandShortcuts.h
+ *
+ * Copyright (c) 2003 Aaron J. Seigo
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "commandShortcuts.h"
+#include "treeview.h"
+
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+
+#include <kactivelabel.h>
+#include <tdeapplication.h>
+#include <tdemessagebox.h>
+#include <kdialog.h>
+#include <khotkeys.h>
+#include <kkeybutton.h>
+#include <tdelocale.h>
+
+static bool treeFilled = false;
+CommandShortcutsModule::CommandShortcutsModule( TQWidget *parent, const char *name )
+: TQWidget( parent, name )
+{
+ treeFilled = false;
+ initGUI();
+}
+
+CommandShortcutsModule::~CommandShortcutsModule()
+{
+}
+
+// Called when [Reset] is pressed
+void CommandShortcutsModule::load()
+{
+ defaults();
+}
+
+void CommandShortcutsModule::save()
+{
+ for (treeItemListIterator it(m_changedItems); it.current(); ++it)
+ {
+ KHotKeys::changeMenuEntryShortcut(it.current()->storageId(), it.current()->accel());
+ }
+ m_changedItems.clear();
+}
+
+void CommandShortcutsModule::defaults()
+{
+ m_tree->clear();
+ m_tree->fill();
+}
+
+TQString CommandShortcutsModule::quickHelp() const
+{
+ return i18n("<h1>Command Shortcuts</h1> Using key bindings you can configure applications "
+ "and commands to be triggered when you press a key or a combination of keys.");
+}
+
+void CommandShortcutsModule::initGUI()
+{
+ TQVBoxLayout* mainLayout = new TQVBoxLayout(this, KDialog::marginHint());
+ mainLayout->addSpacing( KDialog::marginHint() );
+
+ KActiveLabel* label = new KActiveLabel(this);
+ label->setText(i18n("<qt>Below is a list of known commands which you may assign keyboard shortcuts to. "
+ "To edit, add or remove entries from this list use the "
+ "<a href=\"launchMenuEditor\">TDE menu editor</a>.</qt>"));
+ label->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ disconnect(label, TQT_SIGNAL(linkClicked(const TQString &)), label, TQT_SLOT(openLink(const TQString &)));
+ connect(label, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(launchMenuEditor()));
+ mainLayout->addWidget(label);
+
+ m_tree = new AppTreeView(this, "appTreeView");
+ m_tree->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding);
+ mainLayout->setStretchFactor(m_tree, 10);
+ mainLayout->addWidget(m_tree);
+ TQWhatsThis::add(m_tree,
+ i18n("This is a list of all the desktop applications and commands "
+ "currently defined on this system. Click to select a command to "
+ "assign a keyboard shortcut to. Complete management of these "
+ "entries can be done via the menu editor program."));
+ connect(m_tree, TQT_SIGNAL(entrySelected(const TQString&, const TQString &, bool)),
+ this, TQT_SLOT(commandSelected(const TQString&, const TQString &, bool)));
+ connect(m_tree, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(commandDoubleClicked(TQListViewItem *, const TQPoint &, int)));
+ m_shortcutBox = new TQButtonGroup(i18n("Shortcut for Selected Command"), this);
+ mainLayout->addWidget(m_shortcutBox);
+ TQHBoxLayout* buttonLayout = new TQHBoxLayout(m_shortcutBox, KDialog::marginHint() * 2);
+ buttonLayout->addSpacing( KDialog::marginHint() );
+
+ m_noneRadio = new TQRadioButton(i18n("no key", "&None"), m_shortcutBox);
+ TQWhatsThis::add(m_noneRadio, i18n("The selected command will not be associated with any key."));
+ buttonLayout->addWidget(m_noneRadio);
+ m_customRadio = new TQRadioButton(i18n("C&ustom"), m_shortcutBox);
+ TQWhatsThis::add(m_customRadio,
+ i18n("If this option is selected you can create a customized key binding for the"
+ " selected command using the button to the right.") );
+ buttonLayout->addWidget(m_customRadio);
+ m_shortcutButton = new KKeyButton(m_shortcutBox);
+ TQWhatsThis::add(m_shortcutButton,
+ i18n("Use this button to choose a new shortcut key. Once you click it, "
+ "you can press the key-combination which you would like to be assigned "
+ "to the currently selected command."));
+ buttonLayout->addSpacing(KDialog::spacingHint() * 2);
+ buttonLayout->addWidget(m_shortcutButton);
+ connect(m_shortcutButton, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)),
+ this, TQT_SLOT(shortcutChanged(const TDEShortcut&)));
+ connect(m_customRadio, TQT_SIGNAL(toggled(bool)), m_shortcutButton, TQT_SLOT(setEnabled(bool)));
+ connect(m_noneRadio, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shortcutRadioToggled(bool)));
+ buttonLayout->addStretch(1);
+}
+
+void CommandShortcutsModule::launchMenuEditor()
+{
+ if ( TDEApplication::startServiceByDesktopName( "kmenuedit",
+ TQString() /*url*/,
+ 0 /*error*/,
+ 0 /*dcopservice*/,
+ 0 /*pid*/,
+ "" /*startup_id*/,
+ true /*nowait*/ ) != 0 )
+ {
+ KMessageBox::error(this,
+ i18n("The TDE menu editor (kmenuedit) could not be launched.\n"
+ "Perhaps it is not installed or not in your path."),
+ i18n("Application Missing"));
+ }
+}
+
+
+void CommandShortcutsModule::shortcutRadioToggled(bool remove)
+{
+ AppTreeItem *item = static_cast<AppTreeItem*>(m_tree->currentItem());
+ if (!item || item->isDirectory())
+ {
+ return;
+ }
+
+ if (remove)
+ {
+ m_shortcutButton->setShortcut(TQString(), false);
+ item->setAccel(TQString());
+ if (m_changedItems.findRef(item) == -1)
+ {
+ m_changedItems.append(item);
+ }
+ emit changed(true);
+ }
+ else
+ {
+ m_shortcutButton->captureShortcut();
+ }
+}
+
+void CommandShortcutsModule::shortcutChanged(const TDEShortcut& shortcut)
+{
+ AppTreeItem *item = static_cast<AppTreeItem*>(m_tree->currentItem());
+ if (!item || item->isDirectory())
+ {
+ return;
+ }
+
+ TQString accel = shortcut.toString();
+ bool hasAccel = !accel.isEmpty();
+ m_noneRadio->blockSignals(true);
+ m_noneRadio->setChecked(!hasAccel);
+ m_customRadio->setChecked(hasAccel);
+ m_shortcutButton->setShortcut(accel, false);
+ item->setAccel(accel);
+ m_noneRadio->blockSignals(false);
+ if (m_changedItems.findRef(item) == -1)
+ {
+ m_changedItems.append(item);
+ }
+
+ emit changed( true );
+}
+
+void CommandShortcutsModule::showing(TQWidget* w)
+{
+ if (w != this || treeFilled)
+ {
+ return;
+ }
+
+ m_tree->fill();
+ if (m_tree->firstChild())
+ {
+ m_tree->setSelected(m_tree->firstChild(), true);
+ }
+ else
+ {
+ m_shortcutBox->setEnabled(false);
+ }
+ treeFilled = true;
+}
+
+void CommandShortcutsModule::commandSelected(const TQString& /* path */, const TQString & accel, bool isDirectory)
+{
+ m_noneRadio->blockSignals(true);
+ m_shortcutBox->setEnabled(!isDirectory);
+ if (!isDirectory)
+ {
+ bool hasAccel = !accel.isEmpty();
+ m_noneRadio->setChecked(!hasAccel);
+ m_customRadio->setChecked(hasAccel);
+ m_shortcutButton->setShortcut(accel, false);
+ }
+ m_noneRadio->blockSignals(false);
+}
+
+void CommandShortcutsModule::commandDoubleClicked(TQListViewItem *item, const TQPoint &, int)
+{
+ if (!item)
+ {
+ return;
+ }
+ AppTreeItem *rl_item = static_cast<AppTreeItem*>(item);
+ if ( rl_item->isDirectory())
+ return;
+
+ m_shortcutButton->captureShortcut();
+}
+
+#include "commandShortcuts.moc"
diff --git a/kcontrol/keys/commandShortcuts.h b/kcontrol/keys/commandShortcuts.h
new file mode 100644
index 000000000..54be5345b
--- /dev/null
+++ b/kcontrol/keys/commandShortcuts.h
@@ -0,0 +1,75 @@
+/*
+ * commandShortcuts.h
+ *
+ * Copyright (c) 2003 Aaron J. Seigo
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __COMMAND_SHORTCUTS_MODULE_H
+#define __COMMAND_SHORTCUTS_MODULE_H
+
+#include <tqtabwidget.h>
+#include <tdeshortcut.h>
+#include <tqptrlist.h>
+
+class AppTreeView;
+class AppTreeItem;
+class TQButtonGroup;
+class TQRadioButton;
+class KKeyButton;
+class TQListViewItem;
+
+typedef TQPtrList<AppTreeItem> treeItemList;
+typedef TQPtrListIterator<AppTreeItem> treeItemListIterator;
+
+class CommandShortcutsModule : public TQWidget
+{
+ Q_OBJECT
+ public:
+ CommandShortcutsModule( TQWidget *parent = 0, const char *name = 0 );
+ ~CommandShortcutsModule();
+
+ void load();
+ void save();
+ void defaults();
+ TQString quickHelp() const;
+
+ signals:
+ void changed( bool );
+
+ public slots:
+ void showing(TQWidget*);
+
+ protected slots:
+ void commandSelected(const TQString&, const TQString &, bool);
+ void shortcutChanged(const TDEShortcut& shortcut);
+ void shortcutRadioToggled(bool remove);
+ void commandDoubleClicked(TQListViewItem *item, const TQPoint &, int);
+ void launchMenuEditor();
+
+ protected:
+ void initGUI();
+
+ private:
+ AppTreeView* m_tree;
+ TQButtonGroup* m_shortcutBox;
+ TQRadioButton* m_noneRadio;
+ TQRadioButton* m_customRadio;
+ KKeyButton* m_shortcutButton;
+ treeItemList m_changedItems;
+};
+
+#endif // __COMMAND_SHORTCUTS_MODULE_H
diff --git a/kcontrol/keys/convertShortcuts.pl b/kcontrol/keys/convertShortcuts.pl
new file mode 100755
index 000000000..9dc216ac6
--- /dev/null
+++ b/kcontrol/keys/convertShortcuts.pl
@@ -0,0 +1,58 @@
+#!/usr/bin/perl
+$keys=0;
+foreach (<>) {
+ if(/^\[.*\]/) { $keys=0; }
+ if($keys==1) {
+ ($oldkey) = ($_ =~ /([^=]*)=.*/);
+ s/^Execute Command/Run Command/;
+ s/^Execute command/Run Command/;
+ s/^Lock screen/Lock Session/;
+ s/^Lock Screen/Lock Session/;
+ s/^Mouse emulation/Mouse Emulation/;
+ s/^Next keyboard layout/Switch to Next Keyboard Layout/;
+ s/Switch To Next Keyboard Layout/Switch to Next Keyboard Layout/;
+ s/^Screenshot of desktop/Desktop Screenshot/;
+ s/^Pop-up window operations menu/Window Operations Menu/;
+ s/^toggle-clipboard-actions/Enable\/Disable Clipboard Actions/;
+ s/^Screenshot of active window/Window Screenshot/;
+ s/^Show taskmanager/Show Taskmanager/;
+ s/^Show window list/Show Window List/;
+ s/^show-klipper-popupmenu/Show Klipper Popup-Menu/;
+ s/^Switch desktop left/Switch One Desktop to the Left/;
+ s/^Switch desktop right/Switch One Desktop to the Right/;
+ s/^Switch desktop down/Switch One Desktop Down/;
+ s/^Switch desktop up/Switch One Desktop Up/;
+ s/^Switch to desktop /Switch to Desktop /;
+ s/^Switch desktop next/Switch to Next Desktop/;
+ s/^Switch desktop previous/Switch to Previous Desktop/;
+ s/^Toggle Show Desktop/Toggle Showing Desktop/;
+ s/^Toggle raise and lower/Toggle Window Raise\/Lower/;
+ s/^Walk back through desktop list/Walk Through Desktop List \(Reverse\)/;
+ s/^Walk back through desktops/Walk Through Desktops \(Reverse\)/;
+ s/^Walk back through windows/Walk Through Windows \(Reverse\)/;
+ s/^Walk through desktop list/Walk Through Desktop List/;
+ s/^Walk through desktops/Walk Through Desktops/;
+ s/^Walk through windows/Walk Through Windows/;
+ s/^Window close/Window Close/;
+ s/^Window iconify/Window Iconify/;
+ s/^Window lower/Window Lower/;
+ s/^Window maximize/Window Maximize/;
+ s/^Window maximize horizontal/Window Maximize Horizontal/;
+ s/^Window maximize vertical/Window Maximize Vertical/;
+ s/^Window move/Window Move/;
+ s/^Window raise/Window Raise/;
+ s/^Window resize/Window Resize/;
+ s/^Window shade/Window Shade/;
+ s/^Window to Desktop /Window to Desktop /;
+ s/^Window to next desktop/Window to Next Desktop/;
+ s/^Window to previous desktop/Window to Previous Desktop/;
+ s/^repeat-last-klipper-action/Show Klipper Popup-Menu/;
+ ($newkey) = ($_ =~ /([^=]*)=.*/);
+ if ($oldkey ne $newkey) {
+ print "# DELETE " . $oldkey . "\n";
+ print $_
+ }
+ }
+ if(/\[Global Keys\]/) { $keys=1; print $_; }
+ if(/\[Global Shortcuts\]/) { $keys=1; print $_; }
+}
diff --git a/kcontrol/keys/kde4.kksrc b/kcontrol/keys/kde4.kksrc
new file mode 100644
index 000000000..367bc41d6
--- /dev/null
+++ b/kcontrol/keys/kde4.kksrc
@@ -0,0 +1,192 @@
+[Settings]
+Name=KDE Default for 4 Modifier Keys
+Name[af]=Standaard KDE vir 4 verandering sleutels
+Name[be]=Стандартны для KDE з чатырма клавішамі мадыфікацыі
+Name[bg]=KDE (с 4 модификационни клавиша)
+Name[bs]=KDE standardno za 4 modifikatorske tipke
+Name[ca]=Omissió KDE per a 4 tecles modificadores
+Name[cs]=Výchozí pro KDE (4 modifikátory)
+Name[csb]=Domëslny nastôw KDE dlô 4 klawiszów zjinaczi
+Name[cy]=Rhagosodion KDE i 4 Bysell Addasu
+Name[da]=KDE-standard med 4 modifikatortaster
+Name[de]=KDE-Standard für 4 Sondertasten
+Name[el]=Προεπιλογή KDE με 4 πλήκτρα αλλαγής
+Name[eo]=KDE-defaŭlto por 4 modifaj klavoj
+Name[es]=Predeterminado de KDE de 4 modificadores de teclado
+Name[et]=KDE vaikeskeem 4 muuteklahviga
+Name[eu]=KDE lehenetsia 4 tekla modifikatzailekin
+Name[fa]=پیش‌فرض KDE برای ۴ کلید تغییردهندۀ
+Name[fi]=KDE oletus 4:lle muokkausnäppäimelle
+Name[fr]=KDE par défaut pour 4 touches de modifications
+Name[fy]=KDE-standert foar 4 modifikaasjetoetsen
+Name[gl]=Predeterminado de KDE para 4 Teclas Modificadoras
+Name[he]=ברירת המחדל של KDE עבור 4 כפתורים
+Name[hr]=KDE zadano za 4 modifikatorske tipke
+Name[hu]=KDE-s alapértelmezés (4 módosító billentyűvel)
+Name[is]=Sjálfgefið KDE fyrir 4 breytilykla
+Name[it]=Predefinito di KDE per 4 tasti modificatori
+Name[ja]=KDE 標準 (4 モディファイアキー)
+Name[kk]=4 түрлендіру перне үшін KDE-нің әдетті баптауы
+Name[km]=KDE លំនាំដើម​សម្រាប់​គ្រាប់ចុច​កែប្រែ ៤
+Name[ko]=네 개의 수정자 키를 사용하는 KDE 기본값
+Name[lo]=ຄ່າປະລິຍາຍຂອງ KDE ສຳລັບປຸ່ມໃຊ້ຮ່ວມ 4 ປຸ່່ມ
+Name[lt]=KDE numatytoji 4 klavišams - modifikatoriams
+Name[mk]=KDE-стандардно за 4 копчиња-модификатори
+Name[mn]=4 сэлгүүр товчилуурын КДЭ-Стандарт
+Name[ms]=Piawai KDE untuk 4 Kekunci Pengubah Suai
+Name[nb]=KDE-standard for fire valgtaster
+Name[nds]=KDE-Standard för 4 Sünnertasten
+Name[ne]=४ परिमार्जक कुञ्जीका लागि पूर्वनिर्धारित KDE
+Name[nl]=KDE-standaard voor 4 modificatietoetsen
+Name[nn]=KDE-standard med fire valtastar
+Name[nso]=Thuso ya Tshoganetso ya KDE ya Dinotlelo tse 4 tsa Kaonafatso
+Name[pa]=4 ਮੋਡੀਫਾਇਰ ਸਵਿੱਚਾਂ ਲਈ KDE ਮੂਲ
+Name[pl]=Ustawienia domyślne KDE dla 4 klawiszy modyfikatorów
+Name[pt]=Predefinição do KDE para 4 Teclas Modificadoras
+Name[pt_BR]=Padrão do KDE para 4 Teclas Modificadoras
+Name[ro]=KDE implicit pentru 4 taste modificator
+Name[ru]=KDE с четырьмя клавишами-модификаторами
+Name[rw]=Mburabuzi KDE ya Buto 4 Muhindura
+Name[se]=KDE-standárda mas leat njeallje válljenboalu
+Name[sk]=KDE nastavenia pre 4 modifikačné klávesy
+Name[sl]=Privzeto za 4 spremenilne tipke
+Name[sr]=KDE подразумевано за 4 модификаторска тастера
+Name[sr@Latn]=KDE podrazumevano za 4 modifikatorska tastera
+Name[sv]=KDE-förinställt med 4 väljartangenter
+Name[tg]=Пешфарзи KDE барои 4 калидҳои ислоҳӣ
+Name[th]=ค่าปริยายของ KDE สำหรับปุ่มเปลี่ยนหน้าที่ 4 ปุ่ม
+Name[tr]=4 Değiştirici Anahtar için KDE Varsayılan
+Name[tt]=KDE üzeneken, 4 Üzgärtkeç Töymä öçen
+Name[uk]=Типова для KDE з 4 модифікаторами
+Name[ven]=Default ya KDE ya khii nna dzau lugisela
+Name[vi]=Mặc định KDE cho 4 Phím Bổ trợ
+Name[wa]=Pémetou KDE po 4 tapes di candjmints
+Name[xh]=KDE Engagqibekanga ye 4 Izitsixo Mofifier
+Name[zh_CN]=四个修饰键的 KDE 默认值
+Name[zh_TW]=KDE 預設使用 4 個輔助按鍵 (Meta/Alt/Ctrl/Shift)
+Name[zu]=Okwendalo kwe-KDE okusetshenziselwa okhiye bokulungisa abangu-4
+Uses Win Modifier=true
+
+[Global Shortcuts]
+Desktop Screenshot=Win+Print
+Enable/Disable Clipboard Actions=Win+Ctrl+X
+Run Command=Win+Return;Alt+F2
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=Win+Ctrl+Delete
+Lock Session=Win+ScrollLock
+Logout=Win+Escape
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=Win+Ctrl+R
+Mouse Emulation=none
+Popup Launch Menu=Win+Menu
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=Win+Ctrl+V
+Show Taskmanager=Win+Ctrl+Pause
+Show Window List=Win+0
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Win+Ctrl+K
+Switch to Desktop 1=Win+F1
+Switch to Desktop 10=Win+F10
+Switch to Desktop 11=none
+Switch to Desktop 12=none
+Switch to Desktop 13=none
+Switch to Desktop 14=none
+Switch to Desktop 15=none
+Switch to Desktop 16=none
+Switch to Desktop 2=Win+F2
+Switch to Desktop 3=Win+F3
+Switch to Desktop 4=Win+F4
+Switch to Desktop 5=Win+F5
+Switch to Desktop 6=Win+F6
+Switch to Desktop 7=Win+F7
+Switch to Desktop 8=Win+F8
+Switch to Desktop 9=Win+F9
+Switch to Next Desktop=none
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Win+Ctrl+D
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=none
+Walk Through Desktop List (Reverse)=none
+Walk Through Desktops=Win+Tab
+Walk Through Desktops (Reverse)=Win+Shift+Tab
+Walk Through Windows=Alt+Tab
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=Alt+Escape;Alt+F4
+Window Iconify=Win+Minus
+Window Lower=none
+Window Maximize=Win+Plus
+Window Maximize Horizontal=Win+Equal
+Window Maximize Vertical=Win+Bar
+Window Move=none
+Window Operations Menu=Alt+Menu
+Window Raise=none
+Window Resize=none
+Window Screenshot=Alt+Print
+Window Shade=Win+Underscore
+Window to Desktop 1=Win+Alt+F1
+Window to Desktop 10=Win+Alt+F10
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=Win+Alt+F2
+Window to Desktop 3=Win+Alt+F3
+Window to Desktop 4=Win+Alt+F4
+Window to Desktop 5=Win+Alt+F5
+Window to Desktop 6=Win+Alt+F6
+Window to Desktop 7=Win+Alt+F7
+Window to Desktop 8=Win+Alt+F8
+Window to Desktop 9=Win+Alt+F9
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+B
+Back=Alt+Left
+Close=Ctrl+Escape;Ctrl+W
+Copy=Ctrl+C;Ctrl+Insert
+Cut=Ctrl+X;Shift+Delete
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V;Shift+Insert
+PopupMenuContext=Menu
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=Ctrl+Q
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
diff --git a/kcontrol/keys/keyconfig.cpp b/kcontrol/keys/keyconfig.cpp
new file mode 100644
index 000000000..ee39447a1
--- /dev/null
+++ b/kcontrol/keys/keyconfig.cpp
@@ -0,0 +1,545 @@
+//
+// KDE Shortcut config module
+//
+// Copyright (c) Mark Donohoe 1998
+// Copyright (c) Matthias Ettrich 1998
+// Converted to generic key configuration module, Duncan Haldane 1998.
+// Layout fixes copyright (c) 2000 Preston Brown <pbrown@kde.org>
+
+#include <config.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+
+#include <kdebug.h>
+#include <tdelocale.h>
+#include <kstandarddirs.h>
+#include <ksimpleconfig.h>
+#include <tdemessagebox.h>
+#include <kseparator.h>
+#include <dcopclient.h>
+#include <tdeapplication.h>
+#include <kkey_x11.h> // Used in KKeyModule::init()
+
+#include "keyconfig.h"
+#include "keyconfig.moc"
+
+#define KICKER_ALL_BINDINGS
+
+//----------------------------------------------------------------------------
+
+KKeyModule::KKeyModule( TQWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name )
+ : TQWidget( parent, name )
+{
+ init( isGlobal, bSeriesOnly, bSeriesNone );
+}
+
+KKeyModule::KKeyModule( TQWidget *parent, bool isGlobal, const char *name )
+ : TQWidget( parent, name )
+{
+ init( isGlobal, false, false );
+}
+
+void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
+{
+ TQString wtstr;
+
+ KeyType = isGlobal ? "global" : "standard";
+
+ bSeriesOnly = _bSeriesOnly;
+
+ kdDebug(125) << "KKeyModule::init() - Get default key bindings." << endl;
+ if ( KeyType == "global" ) {
+ TDEAccelActions* keys = &actions;
+// see also KKeyModule::init() below !!!
+#define NOSLOTS
+#define TDEShortcuts TDEAccelShortcuts
+#include "../../twin/twinbindings.cpp"
+#include "../../kicker/kicker/core/kickerbindings.cpp"
+#include "../../kicker/taskbar/taskbarbindings.cpp"
+#include "../../kdesktop/kdesktopbindings.cpp"
+#include "../../klipper/klipperbindings.cpp"
+#include "../../kxkb/kxkbbindings.cpp"
+#undef TDEShortcuts
+ KeyScheme = "Global Key Scheme";
+ KeySet = "Global Keys";
+ // Sorting Hack: I'll re-write the module once feature-adding begins again.
+ if( bSeriesOnly || bSeriesNone ) {
+ for( uint i = 0; i < actions.size(); i++ ) {
+ TQString sConfigKey = actions[i].m_sName;
+ //kdDebug(125) << "sConfigKey: " << sConfigKey << endl;
+ int iLastSpace = sConfigKey.findRev( ' ' );
+ bool bIsNum = false;
+ if( iLastSpace >= 0 )
+ sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum );
+
+ kdDebug(125) << "sConfigKey: " << sConfigKey
+ << " bIsNum: " << bIsNum
+ << " bSeriesOnly: " << bSeriesOnly << endl;
+ if( ((bSeriesOnly && !bIsNum) || (bSeriesNone && bIsNum)) && !sConfigKey.contains( ':' ) ) {
+ actions.removeAction( sConfigKey );
+ i--;
+ }
+ }
+ }
+ }
+
+ if ( KeyType == "standard" ) {
+ for(uint i=0; i<TDEStdAccel::NB_STD_ACCELS; i++) {
+ TDEStdAccel::StdAccel id = (TDEStdAccel::StdAccel)i;
+ actions.insertAction( TDEStdAccel::action(id),
+ TDEStdAccel::description(id),
+ TDEStdAccel::defaultKey3(id),
+ TDEStdAccel::defaultKey4(id) );
+ }
+
+ KeyScheme = "Standard Key Scheme";
+ KeySet = "Keys";
+ }
+
+ //kdDebug(125) << "KKeyModule::init() - Read current key bindings from config." << endl;
+ //actions.readActions( KeySet );
+
+ sFileList = new TQStringList();
+ sList = new TQListBox( this );
+
+ //readSchemeNames();
+ sList->setCurrentItem( 0 );
+ connect( sList, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( slotPreviewScheme( int ) ) );
+
+ TQLabel *label = new TQLabel( sList, i18n("&Key Scheme"), this );
+
+ wtstr = i18n("Here you can see a list of the existing key binding schemes with 'Current scheme'"
+ " referring to the settings you are using right now. Select a scheme to use, remove or"
+ " change it.");
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( sList, wtstr );
+
+ addBt = new TQPushButton( i18n("&Save Scheme..."), this );
+ connect( addBt, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) );
+ TQWhatsThis::add(addBt, i18n("Click here to add a new key bindings scheme. You will be prompted for a name."));
+
+ removeBt = new TQPushButton( i18n("&Remove Scheme"), this );
+ removeBt->setEnabled(FALSE);
+ connect( removeBt, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ) );
+ TQWhatsThis::add( removeBt, i18n("Click here to remove the selected key bindings scheme. You can not"
+ " remove the standard system wide schemes, 'Current scheme' and 'TDE default'.") );
+
+ // Hack to get this setting only displayed once. It belongs in main.cpp instead.
+ // That move will take a lot of UI redesigning, though, so i'll do it once CVS
+ // opens up for feature commits again. -- ellis
+ /* Needed to remove because this depended upon non-BC changes in KeyEntry.*/
+ // If this is the "Global Keys" section of the Trinity Control Center:
+ if( isGlobal && !bSeriesOnly ) {
+ preferMetaBt = new TQCheckBox( i18n("Prefer 4-modifier defaults"), this );
+ if( !KKeySequence::keyboardHasMetaKey() )
+ preferMetaBt->setEnabled( false );
+ preferMetaBt->setChecked( KKeySequence::useFourModifierKeys() );
+ connect( preferMetaBt, TQT_SIGNAL(clicked()), TQT_SLOT(slotPreferMeta()) );
+ TQWhatsThis::add( preferMetaBt, i18n("If your keyboard has a Meta key, but you would "
+ "like TDE to prefer the 3-modifier configuration defaults, then this option "
+ "should be unchecked.") );
+ } else
+ preferMetaBt = 0;
+
+ KSeparator* line = new KSeparator( KSeparator::HLine, this );
+
+ kc = new KeyChooserSpec( actions, this, isGlobal );
+ connect( kc, TQT_SIGNAL(keyChange()), this, TQT_SLOT(slotKeyChange()) );
+
+ readScheme();
+
+ TQGridLayout *topLayout = new TQGridLayout( this, 6, 2,
+ KDialog::marginHint(),
+ KDialog::spacingHint());
+ topLayout->addWidget(label, 0, 0);
+ topLayout->addMultiCellWidget(sList, 1, 2, 0, 0);
+ topLayout->addWidget(addBt, 1, 1);
+ topLayout->addWidget(removeBt, 2, 1);
+ if( preferMetaBt )
+ topLayout->addWidget(preferMetaBt, 3, 0);
+ topLayout->addMultiCellWidget(line, 4, 4, 0, 1);
+ topLayout->addRowSpacing(3, 15);
+ topLayout->addMultiCellWidget(kc, 5, 5, 0, 1);
+
+ setMinimumSize(topLayout->sizeHint());
+}
+
+KKeyModule::~KKeyModule (){
+ //kdDebug() << "KKeyModule destructor" << endl;
+ delete kc;
+ delete sFileList;
+}
+
+bool KKeyModule::writeSettings( const TQString& sGroup, TDEConfig* pConfig )
+{
+ kc->commitChanges();
+ actions.writeActions( sGroup, pConfig, true, false );
+ return true;
+}
+
+bool KKeyModule::writeSettingsGlobal( const TQString& sGroup )
+{
+ kc->commitChanges();
+ actions.writeActions( sGroup, 0, true, true );
+ return true;
+}
+
+void KKeyModule::load()
+{
+ kc->listSync();
+}
+
+/*void KKeyModule::save()
+{
+ if( preferMetaBt )
+ KKeySequence::useFourModifierKeys( preferMetaBt->isChecked() );
+
+ kc->commitChanges();
+ actions.writeActions( KeySet, 0, true, true );
+ if ( KeyType == "global" ) {
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ // TODO: create a reconfigureKeys() method.
+ kapp->dcopClient()->send("twin", "", "reconfigure()", "");
+ kapp->dcopClient()->send("kdesktop", "", "configure()", "");
+ kapp->dcopClient()->send("kicker", "Panel", "configure()", "");
+ }
+}*/
+
+void KKeyModule::defaults()
+{
+ if( preferMetaBt )
+ preferMetaBt->setChecked( false );
+ KKeySequence::useFourModifierKeys( false );
+ kc->allDefault();
+}
+
+/*void KKeyModule::slotRemove()
+{
+ TQString kksPath =
+ TDEGlobal::dirs()->saveLocation("data", "kcmkeys/" + KeyType);
+
+ TQDir d( kksPath );
+ if (!d.exists()) // what can we do?
+ return;
+
+ d.setFilter( TQDir::Files );
+ d.setSorting( TQDir::Name );
+ d.setNameFilter("*.kksrc");
+
+ uint ind = sList->currentItem();
+
+ if ( !d.remove( *sFileList->at( ind ) ) ) {
+ KMessageBox::sorry( 0,
+ i18n("This key scheme could not be removed.\n"
+ "Perhaps you do not have permission to alter the file "
+ "system where the key scheme is stored." ));
+ return;
+ }
+
+ sList->removeItem( ind );
+ sFileList->remove( sFileList->at(ind) );
+}*/
+
+void KKeyModule::slotKeyChange()
+{
+ emit keyChange();
+ //emit keysChanged( &dict );
+}
+
+/*void KKeyModule::slotSave( )
+{
+ KSimpleConfig config(*sFileList->at( sList->currentItem() ) );
+ // global=true is necessary in order to
+ // let both 'Global Shortcuts' and 'Shortcut Sequences' be
+ // written to the same scheme file.
+ kc->commitChanges();
+ actions.writeActions( KeyScheme, &config, KeyType == "global", KeyType == "global" );
+}*/
+
+void KKeyModule::slotPreferMeta()
+{
+ kc->setPreferFourModifierKeys( preferMetaBt->isChecked() );
+}
+
+void KKeyModule::readScheme( int index )
+{
+ kdDebug(125) << "readScheme( " << index << " )\n";
+ if( index == 1 )
+ kc->allDefault( false );
+ //else if( index == 2 )
+ // kc->allDefault( true );
+ else {
+ TDEConfigBase* config = 0;
+ if( index == 0 ) config = new TDEConfig( "kdeglobals" );
+ //else config = new KSimpleConfig( *sFileList->at( index ), true );
+
+ actions.readActions( (index == 0) ? KeySet : KeyScheme, config );
+ kc->listSync();
+ delete config;
+ }
+}
+
+/*void KKeyModule::slotAdd()
+{
+ TQString sName;
+
+ if ( sList->currentItem() >= nSysSchemes )
+ sName = sList->currentText();
+ SaveScm ss( 0, "save scheme", sName );
+
+ bool nameValid;
+ TQString sFile;
+ int exists = -1;
+
+ do {
+
+ nameValid = TRUE;
+
+ if ( ss.exec() ) {
+ sName = ss.nameLine->text();
+ if ( sName.stripWhiteSpace().isEmpty() )
+ return;
+
+ sName = sName.simplifyWhiteSpace();
+ sFile = sName;
+
+ int ind = 0;
+ while ( ind < (int) sFile.length() ) {
+
+ // parse the string for first white space
+
+ ind = sFile.find(" ");
+ if (ind == -1) {
+ ind = sFile.length();
+ break;
+ }
+
+ // remove from string
+
+ sFile.remove( ind, 1);
+
+ // Make the next letter upper case
+
+ TQString s = sFile.mid( ind, 1 );
+ s = s.upper();
+ sFile.replace( ind, 1, s );
+
+ }
+
+ exists = -1;
+ for ( int i = 0; i < (int) sList->count(); i++ ) {
+ if ( sName.lower() == (sList->text(i)).lower() ) {
+ exists = i;
+
+ int result = KMessageBox::warningContinueCancel( 0,
+ i18n("A key scheme with the name '%1' already exists.\n"
+ "Do you want to overwrite it?\n").arg(sName),
+ i18n("Save Key Scheme"),
+ i18n("Overwrite"));
+ if (result == KMessageBox::Continue)
+ nameValid = true;
+ else
+ nameValid = false;
+ }
+ }
+ } else return;
+
+ } while ( nameValid == FALSE );
+
+ disconnect( sList, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SLOT( slotPreviewScheme( int ) ) );
+
+
+ TQString kksPath = TDEGlobal::dirs()->saveLocation("data", "kcmkeys/");
+
+ TQDir d( kksPath );
+ if ( !d.exists() )
+ if ( !d.mkdir( kksPath ) ) {
+ tqWarning("KKeyModule: Could not make directory to store user info.");
+ return;
+ }
+
+ kksPath += KeyType ;
+ kksPath += "/";
+
+ d.setPath( kksPath );
+ if ( !d.exists() )
+ if ( !d.mkdir( kksPath ) ) {
+ tqWarning("KKeyModule: Could not make directory to store user info.");
+ return;
+ }
+
+ sFile.prepend( kksPath );
+ sFile += ".kksrc";
+ if (exists == -1)
+ {
+ sList->insertItem( sName );
+ sList->setFocus();
+ sList->setCurrentItem( sList->count()-1 );
+ sFileList->append( sFile );
+ }
+ else
+ {
+ sList->setFocus();
+ sList->setCurrentItem( exists );
+ }
+
+ KSimpleConfig *config =
+ new KSimpleConfig( sFile );
+
+ config->setGroup( KeyScheme );
+ config->writeEntry( "Name", sName );
+ delete config;
+
+ slotSave();
+
+ connect( sList, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SLOT( slotPreviewScheme( int ) ) );
+
+ slotPreviewScheme( sList->currentItem() );
+}*/
+
+/*void KKeyModule::slotPreviewScheme( int indx )
+{
+ readScheme( indx );
+
+ // Set various appropriate for the scheme
+
+ if ( indx < nSysSchemes ||
+ (*sFileList->at(indx)).contains( "/global-" ) ||
+ (*sFileList->at(indx)).contains( "/app-" ) ) {
+ removeBt->setEnabled( FALSE );
+ } else {
+ removeBt->setEnabled( TRUE );
+ }
+}*/
+
+/*void KKeyModule::readSchemeNames( )
+{
+ TQStringList schemes = TDEGlobal::dirs()->findAllResources("data", "kcmkeys/" + KeyType + "/*.kksrc");
+ //TQRegExp r( "-kde[34].kksrc$" );
+ TQRegExp r( "-trinity.kksrc$" );
+
+ sList->clear();
+ sFileList->clear();
+ sList->insertItem( i18n("Current Scheme"), 0 );
+ sFileList->append( "Not a kcsrc file" );
+ sList->insertItem( i18n("TDE Traditional"), 1 );
+ sFileList->append( "Not a kcsrc file" );
+ //sList->insertItem( i18n("TDE Extended (With 'Win' Key)"), 2 );
+ //sList->insertItem( i18n("TDE Default for 4 Modifiers (Meta/Alt/Ctrl/Shift)"), 2 );
+ //sFileList->append( "Not a kcsrc file" );
+ nSysSchemes = 2;
+
+ // This for system files
+ for ( TQStringList::ConstIterator it = schemes.begin(); it != schemes.end(); ++it) {
+ // KPersonalizer relies on .kksrc files containing all the keyboard shortcut
+ // schemes for various setups. It also requires the TDE defaults to be in
+ // a .kksrc file. The TDE defaults shouldn't be listed here.
+ //if( r.search( *it ) != -1 )
+ // continue;
+
+ KSimpleConfig config( *it, true );
+ // TODO: Put 'Name' in "Settings" group
+ config.setGroup( KeyScheme );
+ TQString str = config.readEntry( "Name" );
+
+ sList->insertItem( str );
+ sFileList->append( *it );
+ }
+}*/
+
+/*void KKeyModule::updateKeys( const TDEAccelActions* map_P )
+ {
+ kc->updateKeys( map_P );
+ }*/
+
+// write all the global keys to kdeglobals
+// this is needed to be able to check for conflicts with global keys in app's keyconfig
+// dialogs, kdeglobals is empty as long as you don't apply any change in controlcenter/keys
+void KKeyModule::init()
+{
+ kdDebug(125) << "KKeyModule::init()\n";
+
+ /*kdDebug(125) << "KKeyModule::init() - Initialize # Modifier Keys Settings\n";
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+ TQString fourMods = TDEGlobal::config()->readEntry( "Use Four Modifier Keys", TDEAccel::keyboardHasMetaKey() ? "true" : "false" );
+ TDEAccel::useFourModifierKeys( fourMods == "true" );
+ bool bUseFourModifierKeys = TDEAccel::useFourModifierKeys();
+ TDEGlobal::config()->writeEntry( "User Four Modifier Keys", bUseFourModifierKeys ? "true" : "false", true, true );
+ */
+ TDEAccelActions* keys = new TDEAccelActions();
+
+ kdDebug(125) << "KKeyModule::init() - Load Included Bindings\n";
+// this should match the included files above
+#define NOSLOTS
+#define TDEShortcuts TDEAccelShortcuts
+#include "../../klipper/klipperbindings.cpp"
+#include "../../twin/twinbindings.cpp"
+#include "../../kicker/kicker/core/kickerbindings.cpp"
+#include "../../kicker/taskbar/taskbarbindings.cpp"
+#include "../../kdesktop/kdesktopbindings.cpp"
+#include "../../kxkb/kxkbbindings.cpp"
+#undef TDEShortcuts
+
+ kdDebug(125) << "KKeyModule::init() - Read Config Bindings\n";
+ keys->readActions( "Global Keys" );
+
+ {
+ KSimpleConfig cfg( "kdeglobals" );
+ cfg.deleteGroup( "Global Keys" );
+ }
+
+ kdDebug(125) << "KKeyModule::init() - Write Config Bindings\n";
+ keys->writeActions( "Global Keys", 0, true, true );
+}
+
+//-----------------------------------------------------------------
+// KeyChooserSpec
+//-----------------------------------------------------------------
+
+KeyChooserSpec::KeyChooserSpec( TDEAccelActions& actions, TQWidget* parent, bool bGlobal )
+ : KKeyChooser( actions, parent, bGlobal, false, true ), m_bGlobal( bGlobal )
+ {
+ //if( global )
+ // globalDict()->clear(); // don't check against global keys twice
+ }
+
+/*void KeyChooserSpec::updateKeys( const TDEAccelActions* map_P )
+ {
+ if( global )
+ {
+ stdDict()->clear();
+ for( TDEAccelActions::ConstIterator gIt( map_P->begin());
+ gIt != map_P->end();
+ ++gIt )
+ {
+ int* keyCode = new int;
+ *keyCode = ( *gIt ).aConfigKeyCode;
+ stdDict()->insert( gIt.key(), keyCode);
+ }
+ }
+ else
+ {
+ globalDict()->clear();
+ for( TDEAccelActions::ConstIterator gIt( map_P->begin());
+ gIt != map_P->end();
+ ++gIt )
+ {
+ int* keyCode = new int;
+ *keyCode = ( *gIt ).aConfigKeyCode;
+ globalDict()->insert( gIt.key(), keyCode);
+ }
+ }
+ }
+*/
diff --git a/kcontrol/keys/keyconfig.h b/kcontrol/keys/keyconfig.h
new file mode 100644
index 000000000..f442a2c31
--- /dev/null
+++ b/kcontrol/keys/keyconfig.h
@@ -0,0 +1,90 @@
+//
+// KDE Shortcut config module
+//
+// Copyright (c) Mark Donohoe 1998
+// Copyright (c) Matthias Ettrich 1998
+// Converted to generic key configuration module, Duncan Haldane 1998.
+
+#ifndef __KEYCONFIG_H__
+#define __KEYCONFIG_H__
+
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+
+#include <tdeaccel.h>
+#include <kkeydialog.h>
+//#include <tdecmodule.h>
+#include <tqdict.h>
+
+class TQCheckBox;
+
+class KeyChooserSpec;
+
+class KKeyModule : public TQWidget
+{
+ Q_OBJECT
+public:
+ TDEAccelActions actions;
+ //TDEAccelActions dict;
+ KeyChooserSpec *kc;
+
+ KKeyModule( TQWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name = 0 );
+ KKeyModule( TQWidget *parent, bool isGlobal, const char *name = 0 );
+ ~KKeyModule ();
+
+protected:
+ void init( bool isGlobal, bool bSeriesOnly, bool bSeriesNone );
+
+public:
+ virtual void load();
+ //virtual void save();
+ virtual void defaults();
+ static void init();
+
+ bool writeSettings( const TQString& sGroup, TDEConfig* pConfig );
+ bool writeSettingsGlobal( const TQString& sGroup );
+
+public slots:
+ //void slotPreviewScheme( int );
+ //void slotAdd();
+ //void slotSave();
+ //void slotRemove();
+ void slotKeyChange();
+ void slotPreferMeta();
+ //void updateKeys( const TDEAccelActions* map_P );
+ //void readSchemeNames();
+
+signals:
+ void keyChange();
+ //void keysChanged( const TDEAccelActions* map_P );
+
+protected:
+ TQListBox *sList;
+ TQStringList *sFileList;
+ TQPushButton *addBt;
+ TQPushButton *removeBt;
+ TQCheckBox *preferMetaBt;
+ int nSysSchemes;
+ bool bSeriesOnly;
+
+ void readScheme( int index=0 );
+
+ TQString KeyType;
+ TQString KeyScheme;
+ TQString KeySet;
+
+};
+
+class KeyChooserSpec : public KKeyChooser
+{
+ Q_OBJECT
+public:
+ KeyChooserSpec( TDEAccelActions& actions, TQWidget* parent,
+ bool bGlobal );
+ //void updateKeys( const TDEAccelActions* map_P );
+protected:
+ bool m_bGlobal;
+};
+
+#endif
+
diff --git a/kcontrol/keys/keys.desktop b/kcontrol/keys/keys.desktop
new file mode 100644
index 000000000..bb1d494d3
--- /dev/null
+++ b/kcontrol/keys/keys.desktop
@@ -0,0 +1,239 @@
+[Desktop Entry]
+Exec=tdecmshell keys
+Icon=key_bindings
+Type=Application
+X-DocPath=kcontrol/keys/index.html
+
+
+X-TDE-Library=keys
+X-TDE-Init=keys
+X-TDE-ParentApp=kcontrol
+
+Name=Keyboard Shortcuts
+Name[af]=Sleutelbord Kortpaaie
+Name[ar]=إختصارات لوحة المفاتيح
+Name[az]=Klaviatura Qısa Yolları
+Name[be]=Клавіятурныя скароты
+Name[bg]=Бързи клавиши
+Name[bn]=কীবোর্ড শর্টকাট
+Name[br]=Berradennoù ar stokellaoueg
+Name[bs]=Prečice tastature
+Name[ca]=Dreceres de teclat
+Name[cs]=Klávesové zkratky
+Name[csb]=Klawiszowé skrodzënë
+Name[cy]=Llwybrau Byr Bysellfwrdd
+Name[da]=Tastaturgenveje
+Name[de]=Tastenkürzel
+Name[el]=Συντομεύσεις πληκτρολογίου
+Name[eo]=Klavkombinoj
+Name[es]=Accesos rápidos de teclado
+Name[et]=Kiirklahvid
+Name[eu]=Laster-teklak
+Name[fa]=میان‌برهای صفحه‌ کلید
+Name[fi]=Näppäimistön pikavalinnat
+Name[fr]=Raccourcis clavier
+Name[fy]=Fluchtoetsen
+Name[ga]=Aicearraí Méarchláir
+Name[gl]=Atallos de Teclado
+Name[he]=קיצורי מקשים
+Name[hi]=कुंजीपट शॉर्टकट
+Name[hr]=Prečaci tipkovnice
+Name[hu]=Billentyűparancsok
+Name[is]=Flýtilyklar
+Name[it]=Scorciatoie della tastiera
+Name[ja]=キーボードショートカット
+Name[ka]=კლავიშების მალსახმობი
+Name[kk]=Перне тіркесімдер
+Name[km]=ផ្លូវកាត់​ក្ដារចុច
+Name[ko]=키보드 단축키
+Name[lo]=ການຈັດວາງແປ້ນພິມ
+Name[lt]=Spartieji klavišai
+Name[lv]=Tastatūras saīsnes
+Name[mk]=Кратенки на тастатурата
+Name[mn]=Гарын богино товчилуур
+Name[ms]=Jalan Pintas Papan Kekunci
+Name[mt]=Taqsiriet tat-tastiera
+Name[nb]=Hurtigtaster
+Name[nds]=Tastkombinatschonen
+Name[ne]=कुञ्जीपाटी सर्टकट
+Name[nl]=Sneltoetsen
+Name[nn]=Snøggtastar
+Name[nso]=Ditselakopana tsa Keyboard
+Name[pa]=ਕੀ-ਬੋਰਡ ਸ਼ਾਰਟਕੱਟ
+Name[pl]=Skróty klawiszowe
+Name[pt]=Atalhos do Teclado
+Name[pt_BR]=Atalhos de teclado
+Name[ro]=Acceleratori de tastatură
+Name[ru]=Комбинации клавиш
+Name[rw]=Amahinanzira ya Mwandikisho
+Name[se]=Jođánisboalut
+Name[sk]=Klávesové skratky
+Name[sl]=Bližnjice na tipkovnici
+Name[sr]=Пречице са тастатуре
+Name[sr@Latn]=Prečice sa tastature
+Name[sv]=Snabbtangenter
+Name[ta]=விசைப்பலகை குறுக்கு வழிகள்
+Name[te]=కీబొర్డ్ శీఘ్రమార్గాలు
+Name[tg]=Забонаки кнопкаҳои тез
+Name[th]=ปุ่มพิมพ์ลัด
+Name[tr]=Klavye Kısayolları
+Name[tt]=Töylek Qısqartmaları
+Name[uk]=Скорочення клавіатури
+Name[uz]=Tugmalar birikmasi
+Name[uz@cyrillic]=Тугмалар бирикмаси
+Name[ven]=Tshikhau tsha khiibodo
+Name[vi]=Gõ tắt trên Bàn phím
+Name[wa]=Rascourtis taprece
+Name[xh]=Indlela ezimfutshane Zebhodi yezitshixo
+Name[zh_CN]=键盘快捷键
+Name[zh_TW]=鍵盤捷徑
+Name[zu]=Izindlela Ezimfushane zebhodi yokhiye
+
+Comment=Configuration of keybindings
+Comment[af]=Opstelling van sleutel bindinge
+Comment[az]=Düymə bağlarının quraşdırılması
+Comment[be]=Настаўленні клавішных скаротаў
+Comment[bg]=Настройване на бързите клавиши
+Comment[bn]=কী-বাইন্ডিং কনফিগারেশন
+Comment[br]=Kefluniañ ereoù stokell
+Comment[bs]=Podešavanje značenja tipki
+Comment[ca]=Configuració dels lligams de tecles
+Comment[cs]=Nastavení klávesových zkratek
+Comment[csb]=Nastôw klawiszowëch skrodzënów
+Comment[cy]=Furfweddiad o rwymiadau bysell
+Comment[da]=Indstilling af tastebindinger
+Comment[de]=Einrichtung von Tastenzuordnungen
+Comment[el]=Ρύθμιση συνδυασμών πλήκτρων
+Comment[eo]=Agordo de klavsignifoj, klavkombinoj
+Comment[es]=Configuración de las asociaciones de las teclas
+Comment[et]=Kiirklahvide seadistamine
+Comment[eu]=Tekla elkarketen konfigurazioa
+Comment[fa]=پیکربندی مقیدسازیهای کلید
+Comment[fi]=Näppäinsidosten asetukset
+Comment[fr]=Configuration des raccourcis clavier
+Comment[fy]=Ynstellings foar fluchtoetsen
+Comment[gl]=Configuración dos atallos de teclado
+Comment[he]=שינוי הגדרות מיפוי המקשים
+Comment[hi]=की-बाइंडिंग का कॉन्फ़िगरेशन
+Comment[hr]=Konfiguriranje prečaca tipkovnice
+Comment[hu]=A billentyűparancsok beállításai
+Comment[id]=Konfigurasi keybindings
+Comment[is]=Stillingar altækra flýtihnappa
+Comment[it]=Configurazione delle associazioni di tasti
+Comment[ja]=キーバインディングの設定
+Comment[ka]=კლავიშთა წყვილების კონფიგურაცია
+Comment[kk]=Перне тіркесімдерді баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​ការ​ចង​គ្រាប់ចុច
+Comment[ko]=키 바인딩 설정
+Comment[lo]=ປັບແຕ່ງການຈັບຄູ່ປຸ່ມພິມ
+Comment[lt]=Klavišų siečių derinimas
+Comment[lv]=Taustiņsasaistes konfigurēšana
+Comment[mk]=Конфигурација на врски меѓу копчиња и акции
+Comment[mn]=Товчилуур холболтын тохируулга
+Comment[ms]=Konfigurasi untuk pengikatan kekunci
+Comment[mt]=Konfigurazzjoni ta' assoċjazzjonijiet tat-tasti
+Comment[nb]=Oppsett av hurtigtaster
+Comment[nds]=Instellen vun Tastkombinatschonen
+Comment[ne]=कुञ्जी बाइन्डिङहरूको कन्फिगरेसन
+Comment[nl]=Instellingen voor sneltoetsen
+Comment[nn]=Oppsett av snøggtastar
+Comment[nso]=Peakanyo ya ditlemaganyo tsa dinotlelo
+Comment[oc]=Configuracion dèus lligams de tecles
+Comment[pa]=ਕੀਬਾਇਡ ਦੀ ਸੰਰਚਨਾ
+Comment[pl]=Ustawienia skrótów klawiszowych
+Comment[pt]=Configuração das teclas
+Comment[pt_BR]=Configuração dos atalhos de teclado
+Comment[ro]=Configurează asocierile de taste
+Comment[ru]=Настройка комбинаций клавиш
+Comment[rw]=Iboneza ry'amahuza-buto
+Comment[se]=Jođánisboaluid heiveheapmi
+Comment[sk]=Konfigurácia globálnych klávesových skratiek
+Comment[sl]=Nastavitve tipkovnih vezi
+Comment[sr]=Подешавање пречица са тастатуре
+Comment[sr@Latn]=Podešavanje prečica sa tastature
+Comment[sv]=Anpassa kortkommandon
+Comment[ta]=விசைசேர்வுகளுக்கான வடிவமைப்பு
+Comment[tg]=Танзими аъмоли калидҳо
+Comment[th]=ปรับแต่งปุ่มพิมพ์ลัด
+Comment[tr]=Tuş bağıntılarının yapılandırılması
+Comment[tt]=Töymä berläşmälären caylaw
+Comment[uk]=Налаштування прив'язок клавіш
+Comment[uz]=Tugmalar birikmasini moslash
+Comment[uz@cyrillic]=Тугмалар бирикмасини мослаш
+Comment[ven]=Nzudzanyo yau tanganyisa dzikhii
+Comment[vi]=Cấu hình các tổ hợp phím
+Comment[wa]=Apontiaedje des rascourtis di tapes
+Comment[xh]=Uqwalaselo lwezibopheleo zesitshixo
+Comment[zh_CN]=键绑定配置
+Comment[zh_TW]=按鍵關聯設定
+Comment[zu]=Inhlanganiselo yezibopho zokhiye
+
+Keywords=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;
+Keywords[af]=Keys;Global sleutel bindings;sleutel scheme;sleutel bindings;kortpaaie;application kortpaaie;
+Keywords[ar]=مفايتح، مفاتيح الاختصارات العامّة، خريطة المفاتيح، مفاتيح الاختصارات، اختصارات، اختصارات تطبيقات;
+Keywords[az]=düymələr;Qlobal Düymə bağlantıları;Düymə planı;düymə bağlamaları;qısa yollar;proqram qısa yolları;
+Keywords[be]=Клавішы;Глабальныя скароты;Схема клавішаў;Скароты;Скароты праграмы;Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;
+Keywords[bg]=бърз; клавиш; бързи; достъп; клавишна; комбинация; Keys; Global key bindings; Key scheme; Key bindings; shortcuts; application shortcuts;
+Keywords[ca]=Tecles;lligams de tecles globals;Esquema de tecla;Lligams de tecles;dreceres;dreceres d'aplicació;
+Keywords[cs]=Klávesy;Globální klávesové zkratky;Schéma kláves;Klávesové zkratky;Zkratky;Aplikační zkratky;Vazby;Klávesové vazby;
+Keywords[csb]=Klawisze;globalné klawiszowé skrodzënë;schematë skrodzënów;sparłączenia klawiszów;skrodzënë dlô programów;
+Keywords[cy]=Bysell;Rhwymiadau bysell eang;Cynllun bysell;Llwybrau byr;Llwybrau byr y rhaglen;
+Keywords[da]=Taster;Globale tastebindinger;Tastesystem;Tastebindinger;genveje;programgenveje;
+Keywords[de]=Tasten;Tastenzuordnung;Tastenkürzel;Kurzbefehle;Tastenschema;Tastaturlayout;
+Keywords[el]=Πλήκτρα;Καθολικοί συνδυασμοί πλήκτρων;Θέμα πλήκτρων;Συνδυασμοί πλήκτρων;συντομεύσεις;συντομεύσεις εφαρμογών;
+Keywords[eo]=klavoj;malloka;signifoj;asocioj;kombinoj;klavkombinoj;
+Keywords[es]=Teclas;Asociaciones de teclas globales;Esquema de teclas;Asociaciones de teclas;accesos directos;accesos directos de aplicaciones;
+Keywords[et]=klahvid;globaalsed kiirklahvid;klahviskeem;kiirklahvid;klahvide seosed;rakenduste kiirklahvid;
+Keywords[eu]=Teklak;tekla elkarketa globalak;teklen eskema;tekla elkarketak lasterbideak;aplikazio lasterbideak;
+Keywords[fa]=کلیدها، مقیدسازیهای کلید سراسری، طرحوارۀ کلید، مقیدسازیهای کلید، میان‌برها، میان‌برهای کاربرد;
+Keywords[fi]=Näppäimet;Yleiset näppäinsidokset;Näppäinteema;Näppäinsidokset;pikavalinnat;sovellusten pikavalinnat;
+Keywords[fr]=touches;raccourcis globaux;modèle de raccourcis;raccourcis clavier;clavier;raccourcis d'applications;applications;raccourcis communs;
+Keywords[fy]=keys;toetsen;toetsyndielingen;toetsbiningen;key bindings;fluchtoetsen;globaal ;
+Keywords[gl]=Teclas;Atallos de teclado globais;Esquema de teclas;Atallos de teclado;combinacións de teclas;atallos de aplicacións;
+Keywords[he]=מקשים;מיפוי מקשים גלובליים;תצורת מקשים;מיפוי מקשים;קיצורי דרך;קיצורי דרך של יישומים; Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;
+Keywords[hi]=कुंजियाँ;ग्लोबल की-बाइंडिंग्स;कुंजी योजना;की-बाइंडिंग्स;शॉर्टकट्स;अनुप्रयोग शॉर्टकट्स;
+Keywords[hr]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;Tipke;Prečaci tipkovnice;Raspored tipki;prečaci;prečaci aplikacija;
+Keywords[hu]=billentyűk;globális billentyűhozzárendelés;billentyűkiosztás;billentyűparancsok;gyorsbillentyűk;
+Keywords[id]=Keys;Key bindings Global;Key sheme;Key bindings;shortcuts;application shortcuts;
+Keywords[is]=Lyklar;Hnappar;Flýtihnappar;Flýtilyklar;Lyklabindingar;
+Keywords[it]=tasti;associazioni globali di tasti;schema di tasti;associazioni di tasti;scorciatoie;scorciatoie delle applicazioni;
+Keywords[ja]=キー;グローバルキー;キーバインド;Key sheme;キーバインド;ショートカット;アプリケーションショートカット;
+Keywords[km]=គ្រាប់ចុច;ការ​ចង​គ្រាប់ចុច​សកល;គំនូរ​បំព្រួញ​គ្រាប់ចុច;ការ​ចង​គ្រាប់ចុច;ផ្លូវកាត់;ផ្លូវកាត់​កម្មវិធី;
+Keywords[lo]=ປຸ່ມພິມ;ປຸ່ມພິມສ່ວນກາງູ;ຊຸດປຸ່ມພິມ;ການຈັບຄູ່ປຸ່ມພິມ;ປຸ່ມພິມລັດ;ແປ້ນພິມລັດ;ປຸ່ມພິມລັດອະພລິເຄຊັນ;
+Keywords[lt]=Keys;klavišai;Global key bindings;klavišų sietis;Key scheme;klavišų schema;klavišų išdėstymas;Key bindings;shortcuts;spartieji klavišai;application shortcuts;programų spartieji klavišai;
+Keywords[lv]=Taustiņi;Globālās taustiņu sasaistes;Taustiņu shēma;Taustiņu sasaistes;īsinājumikonas;aplikāciju īsinājumikonas;
+Keywords[mk]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;Копчиња;Глобални врски на копчиња;Шема на копчиња;Врски на копчиња;кратенки;апликациони кратенки;
+Keywords[mn]=Товчилуур;Товчилуур холболт;Богино товчилуур; Богино тушаал;Товчилуурын схем;Гарын байрлал;
+Keywords[nb]=taster;generelle hurtigtaster;hurtigtaster;snarveier;programsnarveier;
+Keywords[nds]=Tasten;Globale Tastkombinatschonen;Tastschema;Tastkombinatschonen;Programmtasten;
+Keywords[ne]=कुञ्जी; विश्वब्यापी कुञ्जी बाइन्डिङ; कुञ्जी योजना; कुञ्जी बाइन्डिङ; सर्टकट; अनुप्रयोग सर्टकट;
+Keywords[nl]=keys;toetsen;toetsenindeling;toetsenbindingen;key bindings;sneltoetsen;globale toetsenbindingen;
+Keywords[nn]=tastar;globale snøggtastar;tasteoppsett;snøggtastar;snarvegar;programsnarvegar;
+Keywords[nso]=Dinotlelo;Ditlemo tsa dinotlelo tsa boditshabatshaba;Leano la dinotlelo; Ditselakopana;ditselakopana tsa tshomiso;
+Keywords[pl]=Klawisze;globalne skróty klawiszowe;schematy skrótów;powiązania klawiszów;skróty dla programów;
+Keywords[pt]=teclas;teclas globais;esquema de teclas;atribuições de teclas;atalhos;atalhos da aplicação;
+Keywords[pt_BR]=Teclas;Teclas de atalho globais;esquema de teclado;teclas de atalho;atalhos de aplicativos;
+Keywords[ro]=taste;asocieri globale de taste;schemă taste;asocieri taste;acceleratori;acceleratori aplicații;scurtături;
+Keywords[ru]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;клавиши;комбинации клавиш;
+Keywords[rw]=Buto;Amahuza buto rusange;Igishushanyombonera cya buto;Amahuza buto;amahinanzira; amahinanzira ya porogaramu;
+Keywords[se]=boalut;oppalaš jođánisboalut;boalločoahkádusat;boalločatnasat;njuolgobálgát;prográmmanjuolgabálgát;
+Keywords[sk]=Klávesy;Globálne klávesové skratky;schéma kláves;klávesové skratky;
+Keywords[sl]=tipke;globalne vezi tipk;razporeditev tipk;vezi tipk;tipkovne vezi;
+Keywords[sr]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;тастери;глобални тастери;пречица;шема тастера;пречице;програмске пречице;
+Keywords[sr@Latn]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;tasteri;globalni tasteri;prečica;šema tastera;prečice;programske prečice;
+Keywords[sv]=Tangenter;Globala kortkommandon;bindningar;Tangentbindningar;genvägar;programgenvägar;
+Keywords[ta]=விசைகள்;உலகலாவிய விசை பிணைப்புகள்;விசை திட்டம்;விசை பிணைப்புகள்;குறுக்குவழிகள்;பயன்பாட்டுக் குறுக்குவழிகள்;
+Keywords[th]=ปุ่มพิมพ์;ปุ่มพิมพ์ส่วนกลาง;ชุดปุ่มพิมพ์;การจับคู่ปุ่มพิมพ์;ปุ่มพิมพ์ลัด;แป้นพิมพ์ลัด;ปุ่มพิมพ์ลัดแอพพลิเคชัน;
+Keywords[tr]=tuşlar;Küresel Tuş bağlantıları;Tuş planı;tuş bağlamaları;kısayollar;uygulama kısayolları;
+Keywords[uk]=клавіші;глобальні прив'язки клавіш;схема клавіш;прив'язка клавіш;
+Keywords[uz]=Tugmalar;Umumiy tugmalar birikmasi;Tugma qolipi;Tugmalar birikmasi;tugma va dastur birikmasi;
+Keywords[uz@cyrillic]=Тугмалар;Умумий тугмалар бирикмаси;Тугма қолипи;Тугмалар бирикмаси;тугма ва дастур бирикмаси;
+Keywords[ven]=Dzikhii;u badekanywa ha khii dzothe;tshikimu tsha khii;u badekanywa ha khii;tshikhau;tshikhau tsha apulifikhesheni;
+Keywords[vi]=Phím;tổ hợp phím toàn cục;phối hợp phím;gõ tắt với tổ hợp phím;gõ tắt cho ứng dụng;
+Keywords[wa]=tapes;globås rascourtis di tapes;adjinçmint del taprece;rascourtis di tapes;rascourtis;rascourtis d' programes;
+Keywords[xh]=Izitshixo;Izibophelelo zesitshixo esiNgqukuva;Udweliso lwesitshixo;Izibophelelo zesitshixo;iindlela ezimfutshane;izicelo zeendlela ezimfutshane;
+Keywords[zh_CN]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;键;全局键绑定;键盘布局;键绑定;快捷键;程序快捷键;
+Keywords[zh_TW]=Keys;Global key bindings;Key scheme;Key bindings;shortcuts;application shortcuts;按鍵;全域按建連結;鍵盤配置;按鍵連結;快速鍵;應用程式捷徑;
+Keywords[zu]=Okhiye;Izibopho zokhiye zezizwe;Iplani lokhiye;Izibopho zokhiye;izindlela ezimfushane;izindlela ezimfushane zomyaleli;
+
+Categories=Qt;TDE;X-TDE-settings-accessibility;
diff --git a/kcontrol/keys/khotkeys.cpp b/kcontrol/keys/khotkeys.cpp
new file mode 100644
index 000000000..636cd972c
--- /dev/null
+++ b/kcontrol/keys/khotkeys.cpp
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2000 Matthias Elter <elter@kde.org>
+ * Lubos Lunak <l.lunak@email.cz>
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <klibloader.h>
+#include "khotkeys.h"
+
+extern "C"
+{
+ static void (*khotkeys_init_2)( void );
+ static void (*khotkeys_cleanup_2)( void );
+ static TQString (*khotkeys_get_menu_entry_shortcut_2)( const TQString& entry_P );
+ static TQString (*khotkeys_change_menu_entry_shortcut_2)( const TQString& entry_P,
+ const TQString& shortcut_P );
+ static bool (*khotkeys_menu_entry_moved_2)( const TQString& new_P, const TQString& old_P );
+ static void (*khotkeys_menu_entry_deleted_2)( const TQString& entry_P );
+}
+
+static bool khotkeys_present = false;
+static bool khotkeys_inited = false;
+
+bool KHotKeys::init()
+{
+ khotkeys_inited = true;
+ KLibrary* lib = KLibLoader::self()->library( "kcm_khotkeys.la" );
+ if( lib == NULL ) return false;
+
+ khotkeys_init_2 = ( void (*)(void)) ( lib->symbol( "khotkeys_init" ));
+ khotkeys_cleanup_2 = ( void (*)(void)) ( lib->symbol( "khotkeys_cleanup" ));
+ khotkeys_get_menu_entry_shortcut_2 =
+ ( TQString (*)( const TQString& ))
+ ( lib->symbol( "khotkeys_get_menu_entry_shortcut" ));
+ khotkeys_change_menu_entry_shortcut_2 =
+ ( TQString (*)( const TQString&, const TQString& ))
+ ( lib->symbol( "khotkeys_change_menu_entry_shortcut" ));
+ khotkeys_menu_entry_moved_2 =
+ ( bool (*)( const TQString&, const TQString& ))
+ ( lib->symbol( "khotkeys_menu_entry_moved" ));
+ khotkeys_menu_entry_deleted_2 =
+ ( void (*)( const TQString& ))
+ ( lib->symbol( "khotkeys_menu_entry_deleted" ));
+ if( khotkeys_init_2
+ && khotkeys_cleanup_2
+ && khotkeys_get_menu_entry_shortcut_2
+ && khotkeys_change_menu_entry_shortcut_2
+ && khotkeys_menu_entry_moved_2
+ && khotkeys_menu_entry_deleted_2 )
+ {
+ khotkeys_init_2();
+ khotkeys_present = true;
+ return true;
+ }
+ return false;
+}
+
+void KHotKeys::cleanup()
+{
+ if( khotkeys_inited )
+ khotkeys_cleanup_2();
+ khotkeys_inited = false;
+}
+
+bool KHotKeys::present()
+{
+ if( !khotkeys_inited )
+ init();
+ return khotkeys_present;
+}
+
+TQString KHotKeys::getMenuEntryShortcut( const TQString& entry_P )
+{
+ if( !khotkeys_inited )
+ init();
+ if( !khotkeys_present )
+ return "";
+ return khotkeys_get_menu_entry_shortcut_2( entry_P );
+}
+
+TQString KHotKeys::changeMenuEntryShortcut( const TQString& entry_P,
+ const TQString shortcut_P )
+ {
+ if( !khotkeys_inited )
+ init();
+ if( !khotkeys_present )
+ return "";
+ return khotkeys_change_menu_entry_shortcut_2( entry_P, shortcut_P );
+ }
+
+bool KHotKeys::menuEntryMoved( const TQString& new_P, const TQString& old_P )
+{
+ if( !khotkeys_inited )
+ init();
+ if( !khotkeys_present )
+ return "";
+ return khotkeys_menu_entry_moved_2( new_P, old_P );
+}
+
+void KHotKeys::menuEntryDeleted( const TQString& entry_P )
+{
+ if( !khotkeys_inited )
+ init();
+ if( !khotkeys_present )
+ return;
+ khotkeys_menu_entry_deleted_2( entry_P );
+}
diff --git a/kcontrol/keys/khotkeys.h b/kcontrol/keys/khotkeys.h
new file mode 100644
index 000000000..c71cce5db
--- /dev/null
+++ b/kcontrol/keys/khotkeys.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2000 Matthias Elter <elter@kde.org>
+ * Lubos Lunak <l.lunak@email.cz>
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __khotkeys_public_h__
+#define __khotkeys_public_h__
+
+#include <tqstring.h>
+
+// see tdebase/khotkeys/kcontrol for info on these
+
+class KHotKeys
+{
+public:
+ static bool init();
+ static void cleanup();
+ static bool present();
+ static TQString getMenuEntryShortcut( const TQString& entry_P );
+ static TQString changeMenuEntryShortcut( const TQString& entry_P,
+ const TQString shortcut_P );
+ static bool menuEntryMoved( const TQString& new_P, const TQString& old_P );
+ static void menuEntryDeleted( const TQString& entry_P );
+};
+
+#endif
diff --git a/kcontrol/keys/mac4.kksrc b/kcontrol/keys/mac4.kksrc
new file mode 100644
index 000000000..0968a2472
--- /dev/null
+++ b/kcontrol/keys/mac4.kksrc
@@ -0,0 +1,197 @@
+[Settings]
+Name=Mac Scheme
+Name[af]=Mac Tema
+Name[be]=Схема Mac
+Name[bg]=Mac
+Name[bn]=ম্যাক্ স্কীম
+Name[br]=Steuñv Mac
+Name[bs]=Mac šema
+Name[ca]=Esquema Mac
+Name[cs]=Mac schéma
+Name[csb]=Mòtiw Mac-a
+Name[cy]=Cynllun Mac
+Name[da]=Mac-system
+Name[de]=Mac-Design
+Name[el]=Μορφή Mac
+Name[eo]=Makintoŝa aranĝo
+Name[es]=Tema Mac
+Name[et]=Maci skeem
+Name[eu]=Mac eskema
+Name[fa]=طرحوارۀ مکینتاش
+Name[fi]=Mac-skeema
+Name[fr]=Thème Mac
+Name[fy]=Mac-skema
+Name[ga]=Scéim Mac
+Name[gl]=Esquema Mac
+Name[he]=ערכת Mac
+Name[hr]=Mac shema
+Name[hu]=Mac
+Name[id]=Skema Mac
+Name[is]=Mac þema
+Name[it]=Schema Mac
+Name[ja]=Macintosh スキーマ
+Name[ka]=Mac სქემა
+Name[kk]=Mac сұлбасы
+Name[km]=គំនូរ​បំព្រួញ Mac
+Name[ko]=Mac 배열
+Name[lo]=ຊຸດຮູບແບບ Mac
+Name[lt]=Mac schema
+Name[mk]=Mac-шема
+Name[mn]=Mac-Схем
+Name[nb]=Mac-oppsett
+Name[nds]=Mac-Vörbild
+Name[ne]=म्याक योजना
+Name[nl]=Mac-schema
+Name[nn]=Mac-oppsett
+Name[nso]=Leano la Mac
+Name[pa]=Mac ਸਰੂਪ
+Name[pl]=Motyw Mac-a
+Name[pt]=Esquema do Mac
+Name[pt_BR]=Esquema Mac
+Name[ro]=Schemă Mac
+Name[ru]=Mac
+Name[rw]=Igishushanyombonera Mac
+Name[se]=Mac-coakkáldat
+Name[sk]=Mac schéma
+Name[sl]=Shema Mac
+Name[sr]=Mac-ова шема
+Name[sr@Latn]=Mac-ova šema
+Name[sv]=Mac schema
+Name[th]=ใช้แบบของ MAC
+Name[tr]=Mac Şeması
+Name[tt]=Mac buyınça
+Name[uk]=Схема Макінтошу
+Name[uz]=Mac mavzusi
+Name[uz@cyrillic]=Mac мавзуси
+Name[ven]=Tshikimu tsha Mac
+Name[vi]=Phối hợp của Mac
+Name[wa]=Tinme Mac
+Name[xh]=Udweliso lwe Mac
+Name[zh_CN]=Mac 方案
+Name[zh_TW]=Mac 按鍵配置
+Name[zu]=Iplani le-Mac
+Uses Win Modifier=true
+
+[Global Shortcuts]
+Desktop Screenshot=Ctrl+Shift+3
+Enable/Disable Clipboard Actions=Alt+Ctrl+X
+Run Command=Alt+F2
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=Alt+Ctrl+Escape
+Lock Session=Alt+Ctrl+L
+Logout=Alt+Ctrl+Delete
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=Alt+Ctrl+R
+Mouse Emulation=none
+Popup Launch Menu=Alt+F1
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=Alt+Ctrl+V
+Show Taskmanager=Ctrl+Escape
+Show Window List=Alt+F5
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=Ctrl+F1
+Switch to Desktop 10=Ctrl+F10
+Switch to Desktop 11=Ctrl+F11
+Switch to Desktop 12=Ctrl+F12
+Switch to Desktop 13=Ctrl+Shift+F1
+Switch to Desktop 14=Ctrl+Shift+F2
+Switch to Desktop 15=Ctrl+Shift+F3
+Switch to Desktop 16=Ctrl+Shift+F4
+Switch to Desktop 2=Ctrl+F2
+Switch to Desktop 3=Ctrl+F3
+Switch to Desktop 4=Ctrl+F4
+Switch to Desktop 5=Ctrl+F5
+Switch to Desktop 6=Ctrl+F6
+Switch to Desktop 7=Ctrl+F7
+Switch to Desktop 8=Ctrl+F8
+Switch to Desktop 9=Ctrl+F9
+Switch to Next Desktop=none
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Alt+Ctrl+D
+Toggle Window Raise/Lower=Ctrl+E
+Walk Through Desktop List=none
+Walk Through Desktop List (Reverse)=none
+Walk Through Desktops=Alt+Tab
+Walk Through Desktops (Reverse)=Alt+Shift+Tab
+Walk Through Windows=Ctrl+Tab
+Walk Through Windows (Reverse)=Ctrl+Shift+Tab
+Window Close=Alt+F4
+Window Iconify=none
+Window Lower=none
+Window Maximize=none
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=none
+Window Operations Menu=Alt+F3
+Window Raise=none
+Window Resize=none
+Window Screenshot=Ctrl+Shift+4
+Window Shade=none
+Window to Desktop 1=none
+Window to Desktop 10=none
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=none
+Window to Desktop 3=none
+Window to Desktop 4=none
+Window to Desktop 5=none
+Window to Desktop 6=none
+Window to Desktop 7=none
+Window to Desktop 8=none
+Window to Desktop 9=none
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+B
+Back=Alt+Left
+Close=Ctrl+W
+Copy=Ctrl+C
+Cut=Ctrl+X
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=Ctrl+G
+FindPrev=Ctrl+Shift+G
+Forward=Alt+Right
+GotoLine=none
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V
+PopupMenuContext=Menu
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=Ctrl+Q
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
diff --git a/kcontrol/keys/main.cpp b/kcontrol/keys/main.cpp
new file mode 100644
index 000000000..d002b667f
--- /dev/null
+++ b/kcontrol/keys/main.cpp
@@ -0,0 +1,220 @@
+/*
+ * main.cpp
+ *
+ * Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
+ *
+ * Requires the Qt widget libraries, available at no cost at
+ * http://www.troll.no/
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <tqlayout.h>
+
+#include <kdebug.h>
+#include <tdelocale.h>
+#include <ksimpleconfig.h>
+
+#include "commandShortcuts.h"
+#include "main.h"
+#include "modifiers.h"
+#include "shortcuts.h"
+#include "khotkeys.h"
+
+/*
+| Shortcut Schemes | Modifier Keys |
+
+o Current scheme o New scheme o Pre-set scheme
+| TDE Traditional |v|| <Save Scheme...> <Remove Scheme>
+[] Prefer 4-modifier defaults
+
+o Current scheme
+o New scheme <Save Scheme>
+o Pre-set scheme <Remove Scheme>
+ | TDE Traditional |v||
+[] Prefer 4-modifier defaults
+
+Global Shortcuts
+*/
+KeyModule::KeyModule( TQWidget *parent, const char *name )
+: TDECModule( parent, name )
+{
+ setQuickHelp( i18n("<h1>Keyboard Shortcuts</h1> Using shortcuts you can configure certain actions to be"
+ " triggered when you press a key or a combination of keys, e.g. Ctrl+C is normally bound to"
+ " 'Copy'. TDE allows you to store more than one 'scheme' of shortcuts, so you might want"
+ " to experiment a little setting up your own scheme, although you can still change back to the"
+ " TDE defaults.<p> In the 'Global Shortcuts' tab you can configure non-application-specific"
+ " bindings, like how to switch desktops or maximize a window; in the 'Application Shortcuts' tab"
+ " you will find bindings typically used in applications, such as copy and paste."));
+
+ initGUI();
+}
+
+KeyModule::~KeyModule()
+{
+ KHotKeys::cleanup();
+}
+
+void KeyModule::initGUI()
+{
+ m_pTab = new TQTabWidget( this );
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ l->addWidget(m_pTab);
+
+ m_pShortcuts = new ShortcutsModule( this );
+ m_pTab->addTab( m_pShortcuts, i18n("Shortcut Schemes") );
+ connect( m_pShortcuts, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) );
+
+ m_pCommandShortcuts = new CommandShortcutsModule ( this );
+ m_pTab->addTab( m_pCommandShortcuts, i18n("Command Shortcuts") );
+ connect( m_pCommandShortcuts, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) );
+ connect( m_pTab, TQT_SIGNAL(currentChanged(TQWidget*)), m_pCommandShortcuts, TQT_SLOT(showing(TQWidget*)) );
+
+ m_pModifiers = new ModifiersModule( this );
+ m_pTab->addTab( m_pModifiers, i18n("Modifier Keys") );
+ connect( m_pModifiers, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) );
+}
+
+void KeyModule::load()
+{
+ load( false );
+}
+
+// Called when [Reset] is pressed
+void KeyModule::load( bool useDefaults )
+{
+ kdDebug(125) << "KeyModule::load()" << endl;
+ m_pShortcuts->load();
+ m_pCommandShortcuts->load();
+ m_pModifiers->load( useDefaults );
+
+ emit changed( useDefaults );
+}
+
+// When [Apply] or [OK] are clicked.
+void KeyModule::save()
+{
+ kdDebug(125) << "KeyModule::save()" << endl;
+ m_pShortcuts->save();
+ m_pCommandShortcuts->save();
+ m_pModifiers->save();
+}
+
+void KeyModule::defaults()
+{
+ kdDebug(125) << "KeyModule::defaults()" << endl;
+ m_pShortcuts->defaults();
+ m_pCommandShortcuts->defaults();
+ m_pModifiers->defaults();
+}
+
+void KeyModule::resizeEvent( TQResizeEvent * )
+{
+ m_pTab->setGeometry( 0, 0, width(), height() );
+}
+
+TQString KeyModule::handbookSection() const
+{
+ int index = m_pTab->currentPageIndex();
+ if (index == 0) {
+ return "key-bindings-intro";
+ }
+ else if (index == 1) {
+ return "key-bindings-shortcuts";
+ }
+ else if (index == 2) {
+ return "key-bindings-modifiers";
+ }
+ else {
+ return TQString::null;
+ }
+}
+
+//----------------------------------------------------
+
+extern "C"
+{
+ KDE_EXPORT TDECModule *create_keys(TQWidget *parent, const char * /*name*/)
+ {
+ // What does this do? Why not insert klipper and kxkb, too? --ellis, 2002/01/15
+ TDEGlobal::locale()->insertCatalogue("twin");
+ TDEGlobal::locale()->insertCatalogue("kdesktop");
+ TDEGlobal::locale()->insertCatalogue("kicker");
+ return new KeyModule(parent, "kcmkeys");
+ }
+
+ KDE_EXPORT void initModifiers()
+ {
+ kdDebug(125) << "KeyModule::initModifiers()" << endl;
+
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+ bool bMacSwap = TDEGlobal::config()->readBoolEntry( "Mac Modifier Swap", false );
+ if( bMacSwap )
+ ModifiersModule::setupMacModifierKeys();
+ }
+
+ KDE_EXPORT void init_keys()
+ {
+ kdDebug(125) << "KeyModule::init()\n";
+
+ /*kdDebug(125) << "KKeyModule::init() - Initialize # Modifier Keys Settings\n";
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+ TQString fourMods = TDEGlobal::config()->readEntry( "Use Four Modifier Keys", TDEAccel::keyboardHasMetaKey() ? "true" : "false" );
+ TDEAccel::useFourModifierKeys( fourMods == "true" );
+ bool bUseFourModifierKeys = TDEAccel::useFourModifierKeys();
+ TDEGlobal::config()->writeEntry( "User Four Modifier Keys", bUseFourModifierKeys ? "true" : "false", true, true );
+ */
+ TDEAccelActions* keys = new TDEAccelActions();
+
+ kdDebug(125) << "KeyModule::init() - Load Included Bindings\n";
+// this should match the included files above
+#define NOSLOTS
+#define SHIFT Qt::SHIFT
+#define CTRL Qt::CTRL
+#define ALT Qt::ALT
+#include "../../klipper/klipperbindings.cpp"
+#include "../../twin/twinbindings.cpp"
+#define KICKER_ALL_BINDINGS
+#include "../../kicker/kicker/core/kickerbindings.cpp"
+#include "../../kicker/taskbar/taskbarbindings.cpp"
+#include "../../kdesktop/kdesktopbindings.cpp"
+#include "../../kxkb/kxkbbindings.cpp"
+
+ // Write all the global keys to kdeglobals.
+ // This is needed to be able to check for conflicts with global keys in app's keyconfig
+ // dialogs, kdeglobals is empty as long as you don't apply any change in controlcenter/keys.
+ // However, avoid writing at every KDE startup, just update them after every rebuild of this file.
+ TDEConfigGroup group( TDEGlobal::config(), "Global Shortcuts" );
+ if( group.readEntry( "Defaults timestamp" ) != __DATE__ __TIME__ ) {
+ kdDebug(125) << "KeyModule::init() - Read Config Bindings\n";
+ // Check for old group,
+ if( TDEGlobal::config()->hasGroup( "Global Keys" ) ) {
+ keys->readActions( "Global Keys" );
+ TDEGlobal::config()->deleteGroup( "Global Keys", true, true );
+ }
+ keys->readActions( "Global Shortcuts" );
+ TDEGlobal::config()->deleteGroup( "Global Shortcuts", true, true );
+
+ kdDebug(125) << "KeyModule::init() - Write Config Bindings\n";
+ keys->writeActions( "Global Shortcuts", 0, true, true );
+ group.writeEntry( "Defaults timestamp", __DATE__ __TIME__, true, true );
+ }
+ delete keys;
+
+ initModifiers();
+ }
+}
+
+#include "main.moc"
diff --git a/kcontrol/keys/main.h b/kcontrol/keys/main.h
new file mode 100644
index 000000000..281b2d37a
--- /dev/null
+++ b/kcontrol/keys/main.h
@@ -0,0 +1,59 @@
+/*
+ * main.h
+ *
+ * Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
+ *
+ * Requires the Qt widget libraries, available at no cost at
+ * http://www.troll.no/
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __keys_main_h
+#define __keys_main_h
+
+#include <tqtabwidget.h>
+#include <tdecmodule.h>
+
+class CommandShortcutsModule;
+class ShortcutsModule;
+class ModifiersModule;
+
+class KeyModule : public TDECModule
+{
+ Q_OBJECT
+ public:
+ KeyModule( TQWidget *parent, const char *name );
+ ~KeyModule();
+
+ void load();
+ void load( bool useDefaults );
+ void save();
+ void defaults();
+
+ virtual TQString handbookSection() const;
+
+ protected:
+ void initGUI();
+ void resizeEvent( TQResizeEvent* );
+
+ private:
+ TQTabWidget* m_pTab;
+ CommandShortcutsModule* m_pCommandShortcuts;
+ ShortcutsModule* m_pShortcuts;
+ ModifiersModule* m_pModifiers;
+};
+
+#endif
diff --git a/kcontrol/keys/modifiers.cpp b/kcontrol/keys/modifiers.cpp
new file mode 100644
index 000000000..39dfb7010
--- /dev/null
+++ b/kcontrol/keys/modifiers.cpp
@@ -0,0 +1,355 @@
+#include "modifiers.h"
+
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+
+#include <tdeapplication.h>
+#include <tdeconfig.h>
+#include <kdebug.h>
+#include <kdialog.h>
+#include <kkeynative.h>
+#include <tdelistview.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
+
+#define XK_MISCELLANY
+#define XK_XKB_KEYS
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/XKBlib.h>
+#include <X11/keysymdef.h>
+#include <ctype.h>
+#undef NONE
+
+/*Modifier Scheme
+ PC: Shift/Ctrl/Alt/Win
+ Mac: Shift/Command/Apple/Alt
+ Custom
+
+X11
+Modifier XMod Label
+Shift Shift [Shift]
+Ctrl Control [Ctrl] Ctrl|Apple
+Alt [Mod1] [Alt] Alt|Command
+Win [Mod4] [Win] Win|Alt|Meta|Super|Hyper
+Extra1 [] [] User definable
+
+ Shift
+ Lock Caps_Lock
+ Control Control_L, Control_R
+ Mod1 Alt_L, Alt_R
+ Mod2 Num_Lock
+ Mod3 Mode_switch
+ Mod4 Super_L, Super_R
+ Mod5 Scroll_Lock
+*/
+
+//For Mac keyboards:
+//1) labels: Shift | Ctrl | Option | Command
+//2) swap Ctrl & Command
+
+ModifiersModule::ModifiersModule( TQWidget *parent, const char *name )
+: TQWidget( parent, name )
+{
+ initGUI();
+ load( false );
+}
+
+void ModifiersModule::load( bool useDefaults )
+{
+ TDEConfig *c = TDEGlobal::config();
+
+ c->setReadDefaults( useDefaults );
+
+ c->setGroup( "Keyboard" );
+
+ m_sLabelCtrlOrig = c->readEntry( "Label Ctrl", "Ctrl" );
+ m_sLabelAltOrig = c->readEntry( "Label Alt", "Alt" );
+ m_sLabelWinOrig = c->readEntry( "Label Win", "Win" );
+
+ m_bMacKeyboardOrig = c->readBoolEntry( "Mac Keyboard", false );
+ m_bMacSwapOrig = m_bMacKeyboardOrig && c->readBoolEntry( "Mac Modifier Swap", false );
+
+ updateWidgetData();
+}
+
+// When [Apply] or [OK] are clicked.
+void ModifiersModule::save()
+{
+ kdDebug(125) << "ModifiersModule::save()" << endl;
+
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+
+ if( m_plblCtrl->text() != "Ctrl" )
+ TDEGlobal::config()->writeEntry( "Label Ctrl", m_plblCtrl->text(), true, true );
+ else
+ TDEGlobal::config()->deleteEntry( "Label Ctrl", false, true );
+
+ if( m_plblAlt->text() != "Alt" )
+ TDEGlobal::config()->writeEntry( "Label Alt", m_plblAlt->text(), true, true );
+ else
+ TDEGlobal::config()->deleteEntry( "Label Alt", false, true );
+
+ if( m_plblWin->text() != "Win" )
+ TDEGlobal::config()->writeEntry( "Label Win", m_plblWin->text(), true, true );
+ else
+ TDEGlobal::config()->deleteEntry( "Label Win", false, true );
+
+ if( m_pchkMacKeyboard->isChecked() )
+ TDEGlobal::config()->writeEntry( "Mac Keyboard", true, true, true );
+ else
+ TDEGlobal::config()->deleteEntry( "Mac Keyboard", false, true );
+
+ bool bMacSwap = m_pchkMacKeyboard->isChecked() && m_pchkMacSwap->isChecked();
+ if( bMacSwap )
+ TDEGlobal::config()->writeEntry( "Mac Modifier Swap", true, true, true );
+ else
+ TDEGlobal::config()->deleteEntry( "Mac Modifier Swap", false, true );
+
+ TDEGlobal::config()->sync();
+
+ if( m_bMacSwapOrig != bMacSwap ) {
+ if( bMacSwap )
+ setupMacModifierKeys();
+ else
+ kapp->tdeinitExec("kxkb");
+ m_bMacSwapOrig = bMacSwap;
+ updateWidgets();
+ }
+}
+
+void ModifiersModule::defaults()
+{
+ load( true );
+}
+
+#define SET_CODE_SYM( iCode, sym ) \
+ if( iCode >= keyCodeMin && iCode <= keyCodeMax ) \
+ rgKeySyms[(iCode-keyCodeMin) * nSymsPerCode] = sym;
+#define SET_MOD_CODE( iMod, code1, code2 ) \
+ xmk->modifiermap[iMod * xmk->max_keypermod + 0] = code1; \
+ xmk->modifiermap[iMod * xmk->max_keypermod + 1] = code2;
+void ModifiersModule::setupMacModifierKeys()
+{
+ const int CODE_Ctrl_L = 0x25, CODE_Ctrl_R = 0x6d;
+ const int CODE_Win_L = 0x73, CODE_Win_R = 0x74;
+ //const int CODE_Alt_L = 0x40, CODE_Alt_R = 0x71;
+ int keyCodeMin, keyCodeMax, nKeyCodes, nSymsPerCode;
+
+ XDisplayKeycodes( tqt_xdisplay(), &keyCodeMin, &keyCodeMax );
+ nKeyCodes = keyCodeMax - keyCodeMin + 1;
+ KeySym* rgKeySyms = XGetKeyboardMapping( tqt_xdisplay(), keyCodeMin, nKeyCodes, &nSymsPerCode );
+ XModifierKeymap* xmk = XGetModifierMapping( tqt_xdisplay() );
+
+ SET_CODE_SYM( CODE_Ctrl_L, XK_Super_L )
+ SET_CODE_SYM( CODE_Ctrl_R, XK_Super_R )
+ SET_CODE_SYM( CODE_Win_L, XK_Control_L )
+ SET_CODE_SYM( CODE_Win_R, XK_Control_R )
+ //SET_CODE_SYM( CODE_Win_L, XK_Alt_L )
+ //SET_CODE_SYM( CODE_Win_R, XK_Alt_R )
+ //SET_CODE_SYM( CODE_Alt_L, XK_Control_L )
+ //SET_CODE_SYM( CODE_Alt_R, XK_Control_R )
+
+ SET_MOD_CODE( ControlMapIndex, CODE_Win_L, CODE_Win_R );
+ SET_MOD_CODE( Mod4MapIndex, CODE_Ctrl_L, CODE_Ctrl_R );
+ //SET_MOD_CODE( ControlMapIndex, CODE_Alt_L, CODE_Alt_R );
+ //SET_MOD_CODE( Mod1MapIndex, CODE_Win_L, CODE_Win_R );
+ //SET_MOD_CODE( Mod4MapIndex, CODE_Ctrl_L, CODE_Ctrl_R );
+
+ XSetModifierMapping( tqt_xdisplay(), xmk );
+ XChangeKeyboardMapping( tqt_xdisplay(), keyCodeMin, nSymsPerCode, rgKeySyms, nKeyCodes );
+ XFree( rgKeySyms );
+ XFreeModifiermap( xmk );
+}
+#undef SET_CODE_SYM
+
+void ModifiersModule::initGUI()
+{
+ TQGridLayout* pLayoutTop = new TQGridLayout( this, 6, 2, KDialog::marginHint() );
+ pLayoutTop->setColStretch( 1, 1 );
+
+ TQGroupBox* pGroup = new TQGroupBox( 2, Qt::Horizontal, i18n("TDE Modifiers"), this );
+ pLayoutTop->addWidget( pGroup, 0, 0 );
+
+ TQLabel* plbl = new TQLabel( i18n("Modifier"), pGroup );
+ TQFont font = plbl->font();
+ font.setUnderline( true );
+ font.setWeight( TQFont::Bold );
+ plbl->setFont( font );
+ plbl = new TQLabel( i18n("X11-Mod"), pGroup );
+ plbl->setFont( font );
+
+ new TQLabel( i18n(TQACCEL_OBJECT_NAME_STRING, "Shift"), pGroup );
+ new TQLabel( "shift", pGroup );
+
+ m_plblCtrl = new TQLabel( i18n(TQACCEL_OBJECT_NAME_STRING, "Ctrl"), pGroup );
+ new TQLabel( "control", pGroup );
+
+ m_plblAlt = new TQLabel( i18n(TQACCEL_OBJECT_NAME_STRING, "Alt"), pGroup );
+ new TQLabel( "mod1", pGroup );
+
+ m_plblWin = new TQLabel( i18n("Win"), pGroup );
+ m_plblWinModX = new TQLabel( "", pGroup );
+ /*m_pcbWinX = newModXComboBox( pGroup );
+ int i;
+ switch( KKeyNative::modX(KKey::WIN) ) {
+ case Mod2Mask: i = 1; break;
+ case Mod3Mask: i = 2; break;
+ case Mod4Mask: i = 3; break;
+ case Mod5Mask: i = 5; break;
+ default: i = 0;
+ }
+ m_pcbWinX->setCurrentItem( i );*/
+
+ m_pchkMacKeyboard = new TQCheckBox( i18n("Macintosh keyboard"), this );
+ m_pchkMacKeyboard->setChecked( m_bMacKeyboardOrig );
+ connect( m_pchkMacKeyboard, TQT_SIGNAL(clicked()), TQT_SLOT(slotMacKeyboardClicked()) );
+ pLayoutTop->addWidget( m_pchkMacKeyboard, 1, 0 );
+
+ m_pchkMacSwap = new TQCheckBox( i18n("MacOS-style modifier usage"), this );
+ m_pchkMacSwap->setChecked( m_bMacSwapOrig );
+ TQWhatsThis::add( m_pchkMacSwap,
+ i18n("Checking this box will change your X Modifier Mapping to "
+ "better reflect the standard MacOS modifier key usage. "
+ "It allows you to use <i>Command+C</i> for <i>Copy</i>, for instance, "
+ "instead of the PC standard of <i>Ctrl+C</I>. "
+ "<b>Command</b> will be used for application and console commands, "
+ "<b>Option</b> as a command modifier and for navigating menus and dialogs, "
+ "and <b>Control</b> for window manager commands.") );
+ connect( m_pchkMacSwap, TQT_SIGNAL(clicked()), TQT_SLOT(slotMacSwapClicked()) );
+ pLayoutTop->addWidget( m_pchkMacSwap, 2, 0 );
+
+ //------------------
+ pLayoutTop->addRowSpacing( 3, KDialog::spacingHint() * 3 );
+
+ pGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("X Modifier Mapping"), this );
+ pLayoutTop->addWidget( pGroup, 4, 0 );
+
+ m_plstXMods = new TDEListView( pGroup );
+ m_plstXMods->setSorting( -1 );
+ m_plstXMods->setSelectionMode( TQListView::NoSelection );
+ m_plstXMods->setAllColumnsShowFocus( true );
+ m_plstXMods->addColumn( i18n("X11-Mod") );
+
+ new TDEListViewItem( m_plstXMods, "mod5" );
+ new TDEListViewItem( m_plstXMods, "mod4" );
+ new TDEListViewItem( m_plstXMods, "mod3" );
+ new TDEListViewItem( m_plstXMods, "mod2" );
+ new TDEListViewItem( m_plstXMods, "mod1" );
+ new TDEListViewItem( m_plstXMods, "control" );
+ new TDEListViewItem( m_plstXMods, "lock" );
+ new TDEListViewItem( m_plstXMods, "shift" );
+
+ //------------------
+ pLayoutTop->setRowStretch( 5, 1 );
+
+ updateWidgets();
+}
+
+/*KComboBox* ModifiersModule::newModXComboBox( TQWidget* parent )
+{
+ KComboBox* pcb = new KComboBox( parent );
+ pcb->insertItem( "" );
+ pcb->insertItem( "mod2" );
+ pcb->insertItem( "mod3" );
+ pcb->insertItem( "mod4" );
+ pcb->insertItem( "mod5" );
+ return pcb;
+}*/
+
+void ModifiersModule::updateWidgetData()
+{
+ m_plblCtrl->setText( m_sLabelCtrlOrig );
+ m_plblAlt->setText( m_sLabelAltOrig );
+ m_plblWin->setText( m_sLabelWinOrig );
+ m_pchkMacKeyboard->setChecked( m_bMacKeyboardOrig );
+ m_pchkMacSwap->setChecked( m_bMacSwapOrig );
+ m_pchkMacSwap->setEnabled( m_bMacKeyboardOrig );
+}
+
+void ModifiersModule::updateWidgets()
+{
+ if( m_pchkMacKeyboard->isChecked() ) {
+ // If keys are swapped around to reflect MacOS norms:
+ if( m_pchkMacSwap->isChecked() ) {
+ m_plblCtrl->setText( i18n("Command") ); // Ctrl in Alt's place
+ m_plblAlt->setText( i18n("Option") ); // Alt in Win's place
+ m_plblWin->setText( i18n("Control") ); // Win in Ctrl's place
+ } else {
+ m_plblCtrl->setText( i18n("Control") ); // Ctrl labeled Control
+ m_plblAlt->setText( i18n("Option") ); // Alt labeled Command
+ m_plblWin->setText( i18n("Command") ); // Win labeled Option
+ }
+ m_pchkMacSwap->setEnabled( true );
+ } else {
+ m_plblCtrl->setText( i18n(TQACCEL_OBJECT_NAME_STRING, "Ctrl") );
+ m_plblAlt->setText( i18n(TQACCEL_OBJECT_NAME_STRING, "Alt") );
+ m_plblWin->setText( i18n("Win") );
+ m_pchkMacSwap->setEnabled( false );
+ }
+
+ XModifierKeymap* xmk = XGetModifierMapping( tqt_xdisplay() );
+
+ for( int iKey = m_plstXMods->columns()-1; iKey < xmk->max_keypermod; iKey++ )
+ m_plstXMods->addColumn( i18n("Key %1").arg(iKey+1) );
+
+ //int iModWinDef = -1;
+ for( int iMod = 0; iMod < 8; iMod++ ) {
+ // Find the default modifier index for the Win key.
+ /*if( iMod > Mod2Index ) {
+ uint symX = XkbKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod], 0, 0 );
+ if( symX == XK_Super_L || symX == XK_Super_R )
+ iModWinDef = iMod;
+ else if( iModWinDef == -1 && (symX == XK_Meta_L || symX == XK_Meta_R) )
+ iModWinDef = iMod;
+ }*/
+
+ // Insert items into X modifier map list
+ for( int iKey = 0; iKey < xmk->max_keypermod; iKey++ ) {
+ uint symX = XkbKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod + iKey], 0, 0 );
+ m_plstXMods->itemAtIndex( iMod )->setText( 1 + iKey, XKeysymToString( symX ) );
+ }
+ }
+
+ XFreeModifiermap( xmk );
+
+ int i;
+ switch( KKeyNative::modX(KKey::WIN) ) {
+ case Mod2Mask: i = 2; break;
+ case Mod3Mask: i = 3; break;
+ case Mod4Mask: i = 4; break;
+ case Mod5Mask: i = 5; break;
+ default: i = 0;
+ }
+ if( i != 0 )
+ m_plblWinModX->setText( "mod" + TQString::number(i) );
+ else
+ m_plblWinModX->setText( "<" + i18n("None") + ">" );
+}
+
+void ModifiersModule::slotMacKeyboardClicked()
+{
+ updateWidgets();
+ emit changed( true );
+}
+
+void ModifiersModule::slotMacSwapClicked()
+{
+ if( m_pchkMacKeyboard->isChecked() && !KKeyNative::keyboardHasWinKey() ) {
+ KMessageBox::sorry( this,
+ i18n("You can only activate this option if your "
+ "X keyboard layout has the 'Super' or 'Meta' keys "
+ "properly configured as modifier keys."),
+ "Incompatibility" );
+ m_pchkMacSwap->setChecked( false );
+ } else {
+ updateWidgets();
+ emit changed( true );
+ }
+}
+
+#include "modifiers.moc"
diff --git a/kcontrol/keys/modifiers.h b/kcontrol/keys/modifiers.h
new file mode 100644
index 000000000..b600bfafb
--- /dev/null
+++ b/kcontrol/keys/modifiers.h
@@ -0,0 +1,49 @@
+#ifndef __MODIFIERS_MODULE_H
+#define __MODIFIERS_MODULE_H
+
+#include <tqwidget.h>
+
+class TQCheckBox;
+class TQLabel;
+class KComboBox;
+class TDEListView;
+
+class ModifiersModule : public TQWidget
+{
+ Q_OBJECT
+ public:
+ ModifiersModule( TQWidget *parent = 0, const char *name = 0 );
+
+ void load( bool useDefaults );
+ void save();
+ void defaults();
+
+ static void setupMacModifierKeys();
+
+ signals:
+ void changed( bool );
+
+ protected:
+ bool m_bMacKeyboardOrig, m_bMacSwapOrig;
+ TQString m_sLabelCtrlOrig, m_sLabelAltOrig, m_sLabelWinOrig;
+
+ TQLabel* m_plblCtrl, * m_plblAlt, * m_plblWin;
+ TQLabel* m_plblWinModX;
+ TQCheckBox* m_pchkMacKeyboard;
+ TDEListView* m_plstXMods;
+ TQCheckBox* m_pchkMacSwap;
+
+ void initGUI();
+ // Places the values in the *Orig variables into their
+ // respective widgets.
+ void updateWidgetData();
+ // Updates the labels according to the check-box settings
+ // and also reads in the X modifier map.
+ void updateWidgets();
+
+ protected slots:
+ void slotMacKeyboardClicked();
+ void slotMacSwapClicked();
+};
+
+#endif
diff --git a/kcontrol/keys/shortcuts.cpp b/kcontrol/keys/shortcuts.cpp
new file mode 100644
index 000000000..e7f599dda
--- /dev/null
+++ b/kcontrol/keys/shortcuts.cpp
@@ -0,0 +1,492 @@
+/*
+ * shortcuts.cpp
+ *
+ * Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
+ * Copyright (c) 2001 Ellis Whitehead <ellis@kde.org>
+ *
+ * Requires the Qt widget libraries, available at no cost at
+ * http://www.troll.no/
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "shortcuts.h"
+
+#include <stdlib.h>
+
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
+
+#include <tdeapplication.h>
+#include <kdebug.h>
+#include <kipc.h>
+#include <kkeynative.h>
+#include <kinputdialog.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
+#include <tdeshortcutlist.h>
+#include <ksimpleconfig.h>
+#include <kstandarddirs.h>
+
+ShortcutsModule::ShortcutsModule( TQWidget *parent, const char *name )
+: TQWidget( parent, name )
+{
+ initGUI();
+}
+
+ShortcutsModule::~ShortcutsModule()
+{
+ delete m_pListGeneral;
+ delete m_pListSequence;
+ delete m_pListApplication;
+}
+
+// Called when [Reset] is pressed
+void ShortcutsModule::load()
+{
+ kdDebug(125) << "ShortcutsModule::load()" << endl;
+ slotSchemeCur();
+}
+
+// When [Apply] or [OK] are clicked.
+void ShortcutsModule::save()
+{
+ kdDebug(125) << "ShortcutsModule::save()" << endl;
+
+ // FIXME: This isn't working. Why? -- ellis, 2002/01/27
+ // Check for old group,
+ if( TDEGlobal::config()->hasGroup( "Keys" ) ) {
+ TDEGlobal::config()->deleteGroup( "Keys", true, true );
+ }
+ TDEGlobal::config()->sync();
+
+ m_pkcGeneral->commitChanges();
+ m_pkcSequence->commitChanges();
+ m_pkcApplication->save();
+
+ m_actionsGeneral.writeActions( "Global Shortcuts", 0, true, true );
+ m_actionsSequence.writeActions( "Global Shortcuts", 0, true, true );
+
+ KIPC::sendMessageAll( KIPC::SettingsChanged, TDEApplication::SETTINGS_SHORTCUTS );
+}
+
+void ShortcutsModule::defaults()
+{
+ m_pkcGeneral->allDefault();
+ m_pkcSequence->allDefault();
+ m_pkcApplication->allDefault();
+}
+
+TQString ShortcutsModule::quickHelp() const
+{
+ return i18n("<h1>Key Bindings</h1> Using key bindings you can configure certain actions to be"
+ " triggered when you press a key or a combination of keys, e.g. Ctrl+C is normally bound to"
+ " 'Copy'. TDE allows you to store more than one 'scheme' of key bindings, so you might want"
+ " to experiment a little setting up your own scheme while you can still change back to the"
+ " TDE defaults.<p> In the tab 'Global Shortcuts' you can configure non-application specific"
+ " bindings like how to switch desktops or maximize a window. In the tab 'Application Shortcuts'"
+ " you will find bindings typically used in applications, such as copy and paste.");
+}
+
+void ShortcutsModule::initGUI()
+{
+ TQString kde_winkeys_env_dir = TDEGlobal::dirs()->localtdedir() + "/env/";
+
+ kdDebug(125) << "A-----------" << endl;
+ TDEAccelActions* keys = &m_actionsGeneral;
+// see also TDEShortcutsModule::init() below !!!
+#define NOSLOTS
+#define KICKER_ALL_BINDINGS
+#include "../../twin/twinbindings.cpp"
+#include "../../kicker/kicker/core/kickerbindings.cpp"
+#include "../../kicker/taskbar/taskbarbindings.cpp"
+#include "../../kdesktop/kdesktopbindings.cpp"
+#include "../../klipper/klipperbindings.cpp"
+#include "../../kxkb/kxkbbindings.cpp"
+
+ kdDebug(125) << "B-----------" << endl;
+ m_actionsSequence.init( m_actionsGeneral );
+
+ kdDebug(125) << "C-----------" << endl;
+ createActionsGeneral();
+ kdDebug(125) << "D-----------" << endl;
+ createActionsSequence();
+ kdDebug(125) << "E-----------" << endl;
+
+ kdDebug(125) << "F-----------" << endl;
+ TQVBoxLayout* pVLayout = new TQVBoxLayout( this, KDialog::marginHint() );
+
+ pVLayout->addSpacing( KDialog::marginHint() );
+
+ // (o) [Current ] <Remove> ( ) New <Save>
+
+ TQHBoxLayout *pHLayout = new TQHBoxLayout( pVLayout, KDialog::spacingHint() );
+ TQButtonGroup* pGroup = new TQButtonGroup( this );
+ pGroup->hide();
+
+ m_prbPre = new TQRadioButton( "", this );
+ connect( m_prbPre, TQT_SIGNAL(clicked()), TQT_SLOT(slotSchemeCur()) );
+ pGroup->insert( m_prbPre );
+ pHLayout->addWidget( m_prbPre );
+
+ m_pcbSchemes = new KComboBox( this );
+ m_pcbSchemes->setMinimumWidth( 100 );
+ m_pcbSchemes->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed );
+ connect( m_pcbSchemes, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSelectScheme(int)) );
+ pHLayout->addWidget( m_pcbSchemes );
+
+ pHLayout->addSpacing( KDialog::marginHint() );
+
+ m_pbtnRemove = new TQPushButton( i18n("&Remove"), this );
+ m_pbtnRemove->setEnabled( false );
+ connect( m_pbtnRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveScheme()) );
+ TQWhatsThis::add( m_pbtnRemove, i18n("Click here to remove the selected key bindings scheme. You cannot"
+ " remove the standard system-wide schemes 'Current scheme' and 'TDE default'.") );
+ pHLayout->addWidget( m_pbtnRemove );
+
+ pHLayout->addSpacing( KDialog::marginHint() * 3 );
+
+ m_prbNew = new TQRadioButton( i18n("New scheme"), this );
+ m_prbNew->setEnabled( false );
+ pGroup->insert( m_prbNew );
+ pHLayout->addWidget( m_prbNew );
+
+ m_pbtnSave = new TQPushButton( i18n("&Save..."), this );
+ m_pbtnSave->setEnabled( false );
+ TQWhatsThis::add( m_pbtnSave, i18n("Click here to add a new key bindings scheme. You will be prompted for a name.") );
+ connect( m_pbtnSave, TQT_SIGNAL(clicked()), TQT_SLOT(slotSaveSchemeAs()) );
+ pHLayout->addWidget( m_pbtnSave );
+
+ pHLayout->addStretch( 1 );
+
+ m_pTab = new TQTabWidget( this );
+ m_pTab->setMargin( KDialog::marginHint() );
+ pVLayout->addWidget( m_pTab );
+
+ // See if ~/.trinity/env/win-key.sh exists
+ TQFile f( kde_winkeys_env_dir + "win-key.sh" );
+ if ( f.exists() == false ) {
+ // No, it does not, so Win is a modifier
+ m_bUseRmWinKeys = true;
+ }
+ else {
+ // Yes, it does, so Win is a key
+ m_bUseRmWinKeys = false;
+ }
+ m_pListGeneral = new TDEAccelShortcutList( m_actionsGeneral, true );
+
+ m_pkcGeneral = new KKeyChooser( m_pListGeneral, this, KKeyChooser::Global, false );
+ m_pkcGeneral->resize (m_pkcGeneral->sizeHint() );
+ if (system("xmodmap 1> /dev/null 2> /dev/null") == 0) {
+ m_useRmWinKeys = new TQCheckBox( i18n("Use Win key as modifier (uncheck to bind Win key to Menu)"), this );
+ m_useRmWinKeys->resize( m_useRmWinKeys->sizeHint() );
+ m_useRmWinKeys->setChecked( m_bUseRmWinKeys );
+ pVLayout->addWidget( m_useRmWinKeys, 1, 0 );
+ connect( m_useRmWinKeys, TQT_SIGNAL(clicked()), TQT_SLOT(slotUseRmWinKeysClicked()) );
+ }
+ m_pTab->addTab( m_pkcGeneral, i18n("&Global Shortcuts") );
+ connect( m_pkcGeneral, TQT_SIGNAL(keyChange()), TQT_SLOT(slotKeyChange()) );
+
+ m_pListSequence = new TDEAccelShortcutList( m_actionsSequence, true );
+ m_pkcSequence = new KKeyChooser( m_pListSequence, this, KKeyChooser::Global, false );
+ m_pTab->addTab( m_pkcSequence, i18n("Shortcut Se&quences") );
+ connect( m_pkcSequence, TQT_SIGNAL(keyChange()), TQT_SLOT(slotKeyChange()) );
+
+ m_pListApplication = new TDEStdAccel::ShortcutList;
+ m_pkcApplication = new KKeyChooser( m_pListApplication, this, KKeyChooser::Standard, false );
+ m_pTab->addTab( m_pkcApplication, i18n("App&lication Shortcuts") );
+ connect( m_pkcApplication, TQT_SIGNAL(keyChange()), TQT_SLOT(slotKeyChange()) );
+
+ kdDebug(125) << "G-----------" << endl;
+ readSchemeNames();
+
+ kdDebug(125) << "I-----------" << endl;
+ slotSchemeCur();
+
+ kdDebug(125) << "J-----------" << endl;
+}
+
+void ShortcutsModule::createActionsGeneral()
+{
+ TDEAccelActions& actions = m_actionsGeneral;
+
+ for( uint i = 0; i < actions.count(); i++ ) {
+ TQString sConfigKey = actions[i].name();
+ //kdDebug(125) << "sConfigKey: " << sConfigKey << endl;
+ int iLastSpace = sConfigKey.findRev( ' ' );
+ bool bIsNum = false;
+ if( iLastSpace >= 0 )
+ sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum );
+
+ //kdDebug(125) << "sConfigKey: " << sConfigKey
+ // << " bIsNum: " << bIsNum << endl;
+ if( bIsNum && !sConfigKey.contains( ':' ) ) {
+ actions[i].setConfigurable( false );
+ actions[i].setName( TQString::null );
+ }
+ }
+}
+
+void ShortcutsModule::createActionsSequence()
+{
+ TDEAccelActions& actions = m_actionsSequence;
+
+ for( uint i = 0; i < actions.count(); i++ ) {
+ TQString sConfigKey = actions[i].name();
+ //kdDebug(125) << "sConfigKey: " << sConfigKey << endl;
+ int iLastSpace = sConfigKey.findRev( ' ' );
+ bool bIsNum = false;
+ if( iLastSpace >= 0 )
+ sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum );
+
+ //kdDebug(125) << "sConfigKey: " << sConfigKey
+ // << " bIsNum: " << bIsNum << endl;
+ if( !bIsNum && !sConfigKey.contains( ':' ) ) {
+ actions[i].setConfigurable( false );
+ actions[i].setName( TQString::null );
+ }
+ }
+}
+
+void ShortcutsModule::readSchemeNames()
+{
+ TQStringList schemes = TDEGlobal::dirs()->findAllResources("data", "kcmkeys/*.kksrc");
+
+ m_pcbSchemes->clear();
+ m_rgsSchemeFiles.clear();
+
+ i18n("User-Defined Scheme");
+ m_pcbSchemes->insertItem( i18n("Current Scheme") );
+ m_rgsSchemeFiles.append( "cur" );
+
+ // This for system files
+ for ( TQStringList::ConstIterator it = schemes.begin(); it != schemes.end(); ++it) {
+ // KPersonalizer relies on .kksrc files containing all the keyboard shortcut
+ // schemes for various setups. It also requires the TDE defaults to be in
+ // a .kksrc file. The TDE defaults shouldn't be listed here.
+ //if( r.search( *it ) != -1 )
+ // continue;
+
+ KSimpleConfig config( *it, true );
+ config.setGroup( "Settings" );
+ TQString str = config.readEntry( "Name" );
+
+ m_pcbSchemes->insertItem( str );
+ m_rgsSchemeFiles.append( *it );
+ }
+}
+
+void ShortcutsModule::resizeEvent( TQResizeEvent * )
+{
+ //m_pTab->setGeometry(0,0,width(),height());
+}
+
+void ShortcutsModule::slotSchemeCur()
+{
+ kdDebug(125) << "ShortcutsModule::slotSchemeCur()" << endl;
+ //m_pcbSchemes->setCurrentItem( 0 );
+ slotSelectScheme();
+}
+
+void ShortcutsModule::slotKeyChange()
+{
+ kdDebug(125) << "ShortcutsModule::slotKeyChange()" << endl;
+ m_prbNew->setEnabled( true );
+ m_prbNew->setChecked( true );
+ m_pbtnSave->setEnabled( true );
+ emit changed( true );
+}
+
+void ShortcutsModule::slotSelectScheme( int )
+{
+ i18n("Your current changes will be lost if you load another scheme before saving this one.");
+ kdDebug(125) << "ShortcutsModule::slotSelectScheme( " << m_pcbSchemes->currentItem() << " )" << endl;
+ TQString sFilename = m_rgsSchemeFiles[ m_pcbSchemes->currentItem() ];
+
+ if( sFilename == "cur" ) {
+ // TODO: remove nulls params
+ m_pkcGeneral->syncToConfig( "Global Shortcuts", 0, true );
+ m_pkcSequence->syncToConfig( "Global Shortcuts", 0, true );
+ m_pkcApplication->syncToConfig( "Shortcuts", 0, false );
+ } else {
+ KSimpleConfig config( sFilename );
+ config.setGroup( "Settings" );
+ //m_sBaseSchemeFile = config.readEntry( "Name" );
+
+ // If the user's keyboard layout doesn't support the Win key,
+ // but this layout scheme requires it,
+ if( !KKeyNative::keyboardHasWinKey()
+ && config.readBoolEntry( "Uses Win Modifier", false ) ) {
+ // TODO: change "Win" to Win's label.
+ int ret = KMessageBox::warningContinueCancel( this,
+ i18n("This scheme requires the \"%1\" modifier key, which is not "
+ "available on your keyboard layout. Do you wish to view it anyway?" )
+ .arg(i18n("Win")) );
+ if( ret == KMessageBox::Cancel )
+ return;
+ }
+
+ m_pkcGeneral->syncToConfig( "Global Shortcuts", &config, true );
+ m_pkcSequence->syncToConfig( "Global Shortcuts", &config, true );
+ m_pkcApplication->syncToConfig( "Shortcuts", &config, false );
+ }
+
+ m_prbPre->setChecked( true );
+ m_prbNew->setEnabled( false );
+ m_pbtnSave->setEnabled( false );
+ emit changed(true);
+}
+
+void ShortcutsModule::slotSaveSchemeAs()
+{
+ TQString sName, sFile;
+ bool bNameValid, ok;
+ int iScheme = -1;
+
+ sName = m_pcbSchemes->currentText();
+
+ do {
+ bNameValid = true;
+
+ sName = KInputDialog::getText( i18n( "Save Key Scheme" ),
+ i18n( "Enter a name for the key scheme:" ), sName, &ok, this );
+
+ if( ok ) {
+ sName = sName.simplifyWhiteSpace();
+ sFile = sName;
+
+ int ind = 0;
+ while( ind < (int) sFile.length() ) {
+ // parse the string for first white space
+ ind = sFile.find(" ");
+ if( ind == -1 ) {
+ ind = sFile.length();
+ break;
+ }
+
+ // remove from string
+ sFile.remove( ind, 1 );
+
+ // Make the next letter upper case
+ TQString s = sFile.mid( ind, 1 );
+ s = s.upper();
+ sFile.replace( ind, 1, s );
+ }
+
+ iScheme = -1;
+ for( int i = 0; i < (int) m_pcbSchemes->count(); i++ ) {
+ if( sName.lower() == (m_pcbSchemes->text(i)).lower() ) {
+ iScheme = i;
+
+ int result = KMessageBox::warningContinueCancel( 0,
+ i18n("A key scheme with the name '%1' already exists;\n"
+ "do you want to overwrite it?\n").arg(sName),
+ i18n("Save Key Scheme"),
+ i18n("Overwrite"));
+ bNameValid = (result == KMessageBox::Continue);
+ }
+ }
+ } else
+ return;
+ } while( !bNameValid );
+
+ disconnect( m_pcbSchemes, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelectScheme(int)) );
+
+ TQString kksPath = TDEGlobal::dirs()->saveLocation( "data", "kcmkeys/" );
+
+ TQDir dir( kksPath );
+ if( !dir.exists() && !dir.mkdir( kksPath ) ) {
+ tqWarning("TDEShortcutsModule: Could not make directory to store user info.");
+ return;
+ }
+
+ sFile.prepend( kksPath );
+ sFile += ".kksrc";
+ if( iScheme == -1 ) {
+ m_pcbSchemes->insertItem( sName );
+ //m_pcbSchemes->setFocus();
+ m_pcbSchemes->setCurrentItem( m_pcbSchemes->count()-1 );
+ m_rgsSchemeFiles.append( sFile );
+ } else {
+ //m_pcbSchemes->setFocus();
+ m_pcbSchemes->setCurrentItem( iScheme );
+ }
+
+ KSimpleConfig *config = new KSimpleConfig( sFile );
+
+ config->setGroup( "Settings" );
+ config->writeEntry( "Name", sName );
+ delete config;
+
+ saveScheme();
+
+ connect( m_pcbSchemes, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSelectScheme(int)) );
+ slotSelectScheme();
+}
+
+void ShortcutsModule::saveScheme()
+{
+ TQString sFilename = m_rgsSchemeFiles[ m_pcbSchemes->currentItem() ];
+ KSimpleConfig config( sFilename );
+
+ m_pkcGeneral->commitChanges();
+ m_pkcSequence->commitChanges();
+ m_pkcApplication->commitChanges();
+
+ m_pListGeneral->writeSettings( "Global Shortcuts", &config, true );
+ m_pListSequence->writeSettings( "Global Shortcuts", &config, true );
+ m_pListApplication->writeSettings( "Shortcuts", &config, true );
+}
+
+void ShortcutsModule::slotRemoveScheme()
+{
+}
+
+void ShortcutsModule::slotUseRmWinKeysClicked()
+{
+ TQString kde_winkeys_env_dir = TDEGlobal::dirs()->localtdedir() + "/env/";
+
+ // See if ~/.trinity/env/win-key.sh exists
+ TQFile f( kde_winkeys_env_dir + "win-key.sh" );
+ if ( f.exists() == false ) {
+ // No, it does not, so Win is currently a modifier
+ if (m_useRmWinKeys->isChecked() == false) {
+ // Create the file
+ if ( f.open( IO_WriteOnly ) ) {
+ TQTextStream stream( &f );
+ stream << "xmodmap -e 'keycode 133=Menu'" << "\n";
+ stream << "xmodmap -e 'keycode 134=Menu'" << "\n";
+ f.close();
+ system("xmodmap -e 'keycode 133=Menu'");
+ system("xmodmap -e 'keycode 134=Menu'");
+ }
+ }
+ }
+ else {
+ // Yes, it does, so Win is currently a key
+ m_bUseRmWinKeys = false;
+ if (m_useRmWinKeys->isChecked() == true) {
+ // Remove the file
+ f.remove();
+ // Update key mappings
+ system("xmodmap -e 'keycode 133=Super_L'");
+ system("xmodmap -e 'keycode 134=Super_R'");
+ }
+ }
+}
+
+#include "shortcuts.moc"
diff --git a/kcontrol/keys/shortcuts.h b/kcontrol/keys/shortcuts.h
new file mode 100644
index 000000000..c1f1b2822
--- /dev/null
+++ b/kcontrol/keys/shortcuts.h
@@ -0,0 +1,81 @@
+/*
+ * shortcuts.h
+ *
+ * Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
+ *
+ * Requires the Qt widget libraries, available at no cost at
+ * http://www.troll.no/
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __SHORTCUTS_MODULE_H
+#define __SHORTCUTS_MODULE_H
+
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include "tdeaccelaction.h"
+#include <kcombobox.h>
+#include <kkeydialog.h>
+
+class ShortcutsModule : public TQWidget
+{
+ Q_OBJECT
+ public:
+ ShortcutsModule( TQWidget *parent = 0, const char *name = 0 );
+ ~ShortcutsModule();
+
+ void load();
+ void save();
+ void defaults();
+ TQString quickHelp() const;
+
+ protected:
+ void initGUI();
+ void createActionsGeneral();
+ void createActionsSequence();
+ void readSchemeNames();
+ void saveScheme();
+ void resizeEvent(TQResizeEvent *e);
+
+ signals:
+ void changed( bool );
+
+ protected slots:
+ void slotSchemeCur();
+ void slotKeyChange();
+ void slotSelectScheme( int = 0 );
+ void slotSaveSchemeAs();
+ void slotRemoveScheme();
+ void slotUseRmWinKeysClicked();
+
+ private:
+ TQTabWidget* m_pTab;
+ TQRadioButton *m_prbPre, *m_prbNew;
+ KComboBox* m_pcbSchemes;
+ TQPushButton* m_pbtnSave, * m_pbtnRemove;
+ int m_nSysSchemes;
+ TQStringList m_rgsSchemeFiles;
+ TDEAccelActions m_actionsGeneral, m_actionsSequence;//, m_actionsApplication;
+ TDEShortcutList* m_pListGeneral, * m_pListSequence, * m_pListApplication;
+ KKeyChooser* m_pkcGeneral, * m_pkcSequence, * m_pkcApplication;
+ TQCheckBox* m_useRmWinKeys;
+ bool m_bUseRmWinKeys;
+};
+
+#endif // __SHORTCUTS_MODULE_H
diff --git a/kcontrol/keys/tdeaccel.upd b/kcontrol/keys/tdeaccel.upd
new file mode 100644
index 000000000..f127390a4
--- /dev/null
+++ b/kcontrol/keys/tdeaccel.upd
@@ -0,0 +1,3 @@
+Id=trinity.3/r1
+File=kdeglobals
+Script=convertShortcuts.pl,perl
diff --git a/kcontrol/keys/tdeaccelaction.h b/kcontrol/keys/tdeaccelaction.h
new file mode 100644
index 000000000..f95a50157
--- /dev/null
+++ b/kcontrol/keys/tdeaccelaction.h
@@ -0,0 +1,205 @@
+// THIS FILE IS A COPY OF tdelibs/tdecore/tdeaccelaction.h AND MUST BE KEPT
+// IN SYNC WITH THAT FILE.
+
+/* This file is part of the KDE libraries
+ Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _TDEACCELACTION_H
+#define _TDEACCELACTION_H
+
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+
+#include <tdeshortcut.h>
+
+class TDEAccelBase;
+
+class TQObject;
+class TDEConfig;
+class TDEConfigBase;
+
+/*
+ TDEAccelAction holds information an a given action, such as "Run Command"
+
+ 1) TDEAccelAction = "Run Command"
+ Default3 = "Alt+F2"
+ Default4 = "Meta+Enter;Alt+F2"
+ 1) TDEShortcut = "Meta+Enter"
+ 1) KKeySequence = "Meta+Enter"
+ 1) KKey = "Meta+Enter"
+ 1) Meta+Enter
+ 2) Meta+Keypad_Enter
+ 2) TDEShortcut = "Alt+F2"
+ 1) KKeySequence = "Alt+F2"
+ 1) Alt+F2
+ 2) TDEAccelAction = "Something"
+ Default3 = ""
+ Default4 = ""
+ 1) TDEShortcut = "Meta+X,Asterisk"
+ 1) KKeySequence = "Meta+X,Asterisk"
+ 1) KKey = "Meta+X"
+ 1) Meta+X
+ 2) KKey = "Asterisk"
+ 1) Shift+8 (English layout)
+ 2) Keypad_Asterisk
+*/
+
+//---------------------------------------------------------------------
+// TDEAccelAction
+//---------------------------------------------------------------------
+
+class TDEAccelAction
+{
+ public:
+ TDEAccelAction();
+ TDEAccelAction( const TDEAccelAction& );
+ TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
+ const TQObject* pObjSlot, const char* psMethodSlot,
+ bool bConfigurable, bool bEnabled );
+ ~TDEAccelAction();
+
+ void clear();
+ bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
+ const TQObject* pObjSlot, const char* psMethodSlot,
+ bool bConfigurable, bool bEnabled );
+
+ TDEAccelAction& operator=( const TDEAccelAction& );
+
+ const TQString& name() const { return m_sName; }
+ const TQString& label() const { return m_sLabel; }
+ const TQString& whatsThis() const { return m_sWhatsThis; }
+ const TDEShortcut& shortcut() const { return m_cut; }
+ const TDEShortcut& shortcutDefault() const;
+ const TDEShortcut& shortcutDefault3() const { return m_cutDefault3; }
+ const TDEShortcut& shortcutDefault4() const { return m_cutDefault4; }
+ const TQObject* objSlotPtr() const { return m_pObjSlot; }
+ const char* methodSlotPtr() const { return m_psMethodSlot; }
+ bool isConfigurable() const { return m_bConfigurable; }
+ bool isEnabled() const { return m_bEnabled; }
+
+ void setName( const TQString& );
+ void setLabel( const TQString& );
+ void setWhatsThis( const TQString& );
+ bool setShortcut( const TDEShortcut& rgCuts );
+ void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
+ void setConfigurable( bool );
+ void setEnabled( bool );
+
+ int getID() const { return m_nIDAccel; }
+ void setID( int n ) { m_nIDAccel = n; }
+ bool isConnected() const;
+
+ bool setKeySequence( uint i, const KKeySequence& );
+ void clearShortcut();
+ bool contains( const KKeySequence& );
+
+ TQString toString() const;
+ TQString toStringInternal() const;
+
+ static bool useFourModifierKeys();
+ static void useFourModifierKeys( bool );
+
+ protected:
+ TQString m_sName,
+ m_sLabel,
+ m_sWhatsThis;
+ TDEShortcut m_cut;
+ TDEShortcut m_cutDefault3, m_cutDefault4;
+ const TQObject* m_pObjSlot;
+ const char* m_psMethodSlot;
+ bool m_bConfigurable,
+ m_bEnabled;
+ int m_nIDAccel;
+ uint m_nConnections;
+
+ void incConnections();
+ void decConnections();
+
+ private:
+ static int g_bUseFourModifierKeys;
+ class TDEAccelActionPrivate* d;
+
+ friend class TDEAccelActions;
+ friend class TDEAccelBase;
+};
+
+//---------------------------------------------------------------------
+// TDEAccelActions
+//---------------------------------------------------------------------
+
+class TDEAccelActions
+{
+ public:
+ TDEAccelActions();
+ TDEAccelActions( const TDEAccelActions& );
+ virtual ~TDEAccelActions();
+
+ void clear();
+ bool init( const TDEAccelActions& );
+ bool init( TDEConfigBase& config, const TQString& sGroup );
+
+ void updateShortcuts( TDEAccelActions& );
+
+ int actionIndex( const TQString& sAction ) const;
+ TDEAccelAction* actionPtr( uint );
+ const TDEAccelAction* actionPtr( uint ) const;
+ TDEAccelAction* actionPtr( const TQString& sAction );
+ const TDEAccelAction* actionPtr( const TQString& sAction ) const;
+ TDEAccelAction* actionPtr( KKeySequence cut );
+ TDEAccelAction& operator []( uint );
+ const TDEAccelAction& operator []( uint ) const;
+
+ TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
+ const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
+ bool bConfigurable = true, bool bEnabled = true );
+ TDEAccelAction* insert( const TQString& sName, const TQString& sLabel );
+ bool remove( const TQString& sAction );
+
+ bool readActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0 );
+ bool writeActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0,
+ bool bWriteAll = false, bool bGlobal = false ) const;
+
+ void emitKeycodeChanged();
+
+ uint count() const;
+
+ protected:
+ TDEAccelBase* m_pTDEAccelBase;
+ TDEAccelAction** m_prgActions;
+ uint m_nSizeAllocated, m_nSize;
+
+ void resize( uint );
+ void insertPtr( TDEAccelAction* );
+
+ private:
+ class TDEAccelActionsPrivate* d;
+
+ TDEAccelActions( TDEAccelBase* );
+ void initPrivate( TDEAccelBase* );
+ TDEAccelActions& operator =( TDEAccelActions& );
+
+ friend class TDEAccelBase;
+};
+
+#endif // _TDEACCELACTION_H
diff --git a/kcontrol/keys/treeview.cpp b/kcontrol/keys/treeview.cpp
new file mode 100644
index 000000000..36d0e3bf4
--- /dev/null
+++ b/kcontrol/keys/treeview.cpp
@@ -0,0 +1,282 @@
+/*
+ * Copyright (C) 2000 Matthias Elter <elter@kde.org>
+ * Copyright (C) 2001-2002 Raffaele Sandrini <sandrini@kde.org)
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <unistd.h>
+
+#include <tqdir.h>
+#include <tqimage.h>
+#include <tqstringlist.h>
+#include <tqcursor.h>
+
+#include <kstandarddirs.h>
+#include <tdelocale.h>
+#include <kiconloader.h>
+#include <kservicegroup.h>
+
+#include "treeview.h"
+#include "treeview.moc"
+#include "khotkeys.h"
+
+AppTreeItem::AppTreeItem(TQListViewItem *parent, const TQString& storageId)
+ : TDEListViewItem(parent), m_init(false), m_storageId(storageId) {}
+
+AppTreeItem::AppTreeItem(TQListViewItem *parent, TQListViewItem *after, const TQString& storageId)
+ : TDEListViewItem(parent, after), m_init(false), m_storageId(storageId) {}
+
+AppTreeItem::AppTreeItem(TQListView *parent, const TQString& storageId)
+ : TDEListViewItem(parent), m_init(false), m_storageId(storageId) {}
+
+AppTreeItem::AppTreeItem(TQListView *parent, TQListViewItem *after, const TQString& storageId)
+ : TDEListViewItem(parent, after), m_init(false), m_storageId(storageId) {}
+
+void AppTreeItem::setName(const TQString &name)
+{
+ m_name = name;
+ setText(0, m_name);
+}
+
+void AppTreeItem::setAccel(const TQString &accel)
+{
+ m_accel = accel;
+ int temp = accel.find(';');
+ if (temp != -1)
+ {
+ setText(1, accel.left(temp));
+ setText(2, accel.right(accel.length() - temp - 1));
+ }
+ else
+ {
+ setText(1, m_accel);
+ setText(2, TQString::null);
+ }
+}
+
+void AppTreeItem::setOpen(bool o)
+{
+ if (o && !m_directoryPath.isEmpty() && !m_init)
+ {
+ m_init = true;
+ AppTreeView *tv = static_cast<AppTreeView *>(listView());
+ tv->fillBranch(m_directoryPath, this);
+ }
+ TQListViewItem::setOpen(o);
+}
+
+static TQPixmap appIcon(const TQString &iconName)
+{
+ TQPixmap normal = SmallIcon( iconName );
+ // make sure they are not larger than 20x20
+ if (normal.width() > 20 || normal.height() > 20)
+ {
+ TQImage tmp = normal.convertToImage();
+ tmp = tmp.smoothScale(20, 20);
+ normal.convertFromImage(tmp);
+ }
+ return normal;
+}
+
+
+AppTreeView::AppTreeView( TQWidget *parent, const char *name )
+ : TDEListView(parent, name)
+{
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ setAllColumnsShowFocus(true);
+ setRootIsDecorated(true);
+ setSorting(-1);
+ setAcceptDrops(false);
+ setDragEnabled(false);
+ setMinimumWidth(240);
+ setResizeMode(AllColumns);
+
+ addColumn(i18n("Command"));
+ addColumn(i18n("Shortcut"));
+ addColumn(i18n("Alternate"));
+
+ connect(this, TQT_SIGNAL(clicked( TQListViewItem* )),
+ TQT_SLOT(itemSelected( TQListViewItem* )));
+
+ connect(this,TQT_SIGNAL(selectionChanged ( TQListViewItem * )),
+ TQT_SLOT(itemSelected( TQListViewItem* )));
+}
+
+AppTreeView::~AppTreeView()
+{
+}
+
+void AppTreeView::fill()
+{
+ TQApplication::setOverrideCursor(Qt::WaitCursor);
+ clear();
+ fillBranch(TQString::null, 0);
+ TQApplication::restoreOverrideCursor();
+}
+
+void AppTreeView::fillBranch(const TQString& rPath, AppTreeItem *parent)
+{
+ // get rid of leading slash in the relative path
+ TQString relPath = rPath;
+ if(relPath[0] == '/')
+ relPath = relPath.mid(1, relPath.length());
+
+ // We ask KSycoca to give us all services (sorted).
+ KServiceGroup::Ptr root = KServiceGroup::group(relPath);
+
+ if (!root || !root->isValid())
+ return;
+
+ KServiceGroup::List list = root->entries(true);
+
+ TQListViewItem *after = 0;
+
+ for(KServiceGroup::List::ConstIterator it = list.begin();
+ it != list.end(); ++it)
+ {
+ KSycocaEntry * e = *it;
+
+ if (e->isType(KST_KServiceGroup))
+ {
+ KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e));
+ TQString groupCaption = g->caption();
+
+ // Item names may contain ampersands. To avoid them being converted
+ // to accelerators, replace them with two ampersands.
+ groupCaption.replace("&", "&&");
+
+ AppTreeItem *item;
+ if (parent == 0)
+ item = new AppTreeItem(this, after, TQString::null);
+ else
+ item = new AppTreeItem(parent, after, TQString::null);
+
+ item->setName(groupCaption);
+ item->setPixmap(0, appIcon(g->icon()));
+ item->setDirectoryPath(g->relPath());
+ item->setExpandable(true);
+ after = item;
+ }
+ else if (e->isType(KST_KService))
+ {
+ KService::Ptr s(static_cast<KService *>(e));
+ TQString serviceCaption = s->name();
+
+ // Item names may contain ampersands. To avoid them being converted
+ // to accelerators, replace them with two ampersands.
+ serviceCaption.replace("&", "&&");
+
+ AppTreeItem* item;
+ if (parent == 0)
+ item = new AppTreeItem(this, after, s->storageId());
+ else
+ item = new AppTreeItem(parent, after, s->storageId());
+
+ item->setName(serviceCaption);
+ item->setAccel(KHotKeys::getMenuEntryShortcut(s->storageId()));
+ item->setPixmap(0, appIcon(s->icon()));
+
+ after = item;
+ }
+ }
+}
+
+void AppTreeView::itemSelected(TQListViewItem *item)
+{
+ AppTreeItem *_item = static_cast<AppTreeItem*>(item);
+
+ if(!item) return;
+
+ emit entrySelected(_item->storageId(), _item->accel(), _item->isDirectory());
+}
+
+TQStringList AppTreeView::fileList(const TQString& rPath)
+{
+ TQString relativePath = rPath;
+
+ // truncate "/.directory"
+ int pos = relativePath.findRev("/.directory");
+ if (pos > 0) relativePath.truncate(pos);
+
+ TQStringList filelist;
+
+ // loop through all resource dirs and build a file list
+ TQStringList resdirlist = TDEGlobal::dirs()->resourceDirs("apps");
+ for (TQStringList::ConstIterator it = resdirlist.begin(); it != resdirlist.end(); ++it)
+ {
+ TQDir dir((*it) + "/" + relativePath);
+ if(!dir.exists()) continue;
+
+ dir.setFilter(TQDir::Files);
+ dir.setNameFilter("*.desktop;*.kdelnk");
+
+ // build a list of files
+ TQStringList files = dir.entryList();
+ for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
+ // does not work?!
+ //if (filelist.contains(*it)) continue;
+
+ if (relativePath.isEmpty()) {
+ filelist.remove(*it); // hack
+ filelist.append(*it);
+ }
+ else {
+ filelist.remove(relativePath + "/" + *it); //hack
+ filelist.append(relativePath + "/" + *it);
+ }
+ }
+ }
+ return filelist;
+}
+
+TQStringList AppTreeView::dirList(const TQString& rPath)
+{
+ TQString relativePath = rPath;
+
+ // truncate "/.directory"
+ int pos = relativePath.findRev("/.directory");
+ if (pos > 0) relativePath.truncate(pos);
+
+ TQStringList dirlist;
+
+ // loop through all resource dirs and build a subdir list
+ TQStringList resdirlist = TDEGlobal::dirs()->resourceDirs("apps");
+ for (TQStringList::ConstIterator it = resdirlist.begin(); it != resdirlist.end(); ++it)
+ {
+ TQDir dir((*it) + "/" + relativePath);
+ if(!dir.exists()) continue;
+ dir.setFilter(TQDir::Dirs);
+
+ // build a list of subdirs
+ TQStringList subdirs = dir.entryList();
+ for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) {
+ if ((*it) == "." || (*it) == "..") continue;
+ // does not work?!
+ // if (dirlist.contains(*it)) continue;
+
+ if (relativePath.isEmpty()) {
+ dirlist.remove(*it); //hack
+ dirlist.append(*it);
+ }
+ else {
+ dirlist.remove(relativePath + "/" + *it); //hack
+ dirlist.append(relativePath + "/" + *it);
+ }
+ }
+ }
+ return dirlist;
+}
diff --git a/kcontrol/keys/treeview.h b/kcontrol/keys/treeview.h
new file mode 100644
index 000000000..4da6d2351
--- /dev/null
+++ b/kcontrol/keys/treeview.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2000 Matthias Elter <elter@kde.org>
+ * Copyright (C) 2001-2002 Raffaele Sandrini <sandrini@kde.org)
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __treeview_h__
+#define __treeview_h__
+
+#include <tqstring.h>
+#include <tdelistview.h>
+
+class TQPopupMenu;
+class TDEActionCollection;
+class KDesktopFile;
+
+class AppTreeItem : public TDEListViewItem
+{
+
+public:
+ AppTreeItem(TQListViewItem *parent, const TQString& storageId);
+ AppTreeItem(TQListViewItem *parent, TQListViewItem *after, const TQString& storageId);
+ AppTreeItem(TQListView *parent, const TQString& storageId);
+ AppTreeItem(TQListView *parent, TQListViewItem* after, const TQString& storageId);
+
+ TQString storageId() const { return m_storageId; }
+ void setDirectoryPath(const TQString& path) { m_directoryPath = path; }
+
+ TQString name() const { return m_name; }
+ void setName(const TQString &name);
+
+ TQString accel() const { return m_accel; }
+ void setAccel(const TQString &accel);
+
+ bool isDirectory() const { return !m_directoryPath.isEmpty(); }
+
+ virtual void setOpen(bool o);
+
+private:
+ bool m_init : 1;
+ TQString m_storageId;
+ TQString m_name;
+ TQString m_directoryPath;
+ TQString m_accel;
+};
+
+class AppTreeView : public TDEListView
+{
+ friend class AppTreeItem;
+ Q_OBJECT
+public:
+ AppTreeView(TQWidget *parent=0, const char *name=0);
+ ~AppTreeView();
+ void fill();
+
+signals:
+ void entrySelected(const TQString&, const TQString &, bool);
+
+protected slots:
+ void itemSelected(TQListViewItem *);
+
+protected:
+ void fillBranch(const TQString& relPath, AppTreeItem* parent);
+
+ TQStringList fileList(const TQString& relativePath);
+ TQStringList dirList(const TQString& relativePath);
+};
+
+
+#endif
diff --git a/kcontrol/keys/trinity.kksrc b/kcontrol/keys/trinity.kksrc
new file mode 100644
index 000000000..57681b60f
--- /dev/null
+++ b/kcontrol/keys/trinity.kksrc
@@ -0,0 +1,193 @@
+[Settings]
+Name=TDE Default for 3 Modifier Keys
+Name[af]=Standaard TDE vir 3 verandering sleutels
+Name[be]=Стандартны для TDE з трыма клавішамі мадыфікацыі
+Name[bg]=TDE (с 3 модификационни клавиша)
+Name[bs]=TDE standardno za 3 modifikatorske tipke
+Name[ca]=Omissió TDE per a 3 tecles modificadores
+Name[cs]=Výchozí pro TDE (3 modifikátory)
+Name[csb]=Domëslny nastôw TDE dlô 3 klawiszów zjinaczi
+Name[cy]=Rhagosodion TDE i 3 Bysell Addasu
+Name[da]=TDE-standard med 3 modifikatortaster
+Name[de]=TDE-Standard für 3 Sondertasten
+Name[el]=Προεπιλογή TDE με 3 πλήκτρα αλλαγής
+Name[eo]=TDE-defaŭlto por 3 modifaj klavoj
+Name[es]=Predeterminado de TDE de 3 modificadores de teclado
+Name[et]=TDE vaikeskeem 3 muuteklahviga
+Name[eu]=TDE lehenetsia 3 tekla modifikatzailekin
+Name[fa]=پیش‌فرض TDE برای ۳ کلید تغییردهندۀ
+Name[fi]=TDE oletus 3:lle muokkausnäppäimelle
+Name[fr]=TDE par défaut pour 3 touches de modifications
+Name[fy]=TDE-standert foar 3 modifikaasjetoetsen
+Name[gl]=Predeterminado de TDE para 3 Teclas Modificadoras
+Name[he]=ברירת המחדל של TDE עבור 3 כפתורים
+Name[hr]=TDE zadano za 3 modifikatorske tipke
+Name[hu]=TDE-s alapértelmezés (3 módosító billentyűvel)
+Name[is]=Sjálfgefið TDE fyrir 3 breytilykla
+Name[it]=Predefinito di TDE per 3 tasti modificatori
+Name[ja]=TDE 標準 (3 モディファイアキー)
+Name[kk]=3 түрлендіру перне үшін TDE-нің әдетті баптауы
+Name[km]=TDE លំនាំដើម​សម្រាប់​គ្រាប់ចុច​កែប្រែ ៣
+Name[ko]=세 개의 수정자 키를 사용하는 TDE 기본값
+Name[lo]=ຄ່າປະລິຍາຍຂອງ TDE ສຳລັບປຸ່ມໃຊ້ຮ່ວມ 3 ປຸ່ມ
+Name[lt]=TDE numatytoji 3 klavišams - modifikatoriams
+Name[mk]=TDE-стандардно за 3 копчиња-модификатори
+Name[mn]=3 сэлгүүр товчилуурын КДЭ-Стандарт
+Name[ms]=Piawai TDE untuk 3 Kekunci Pengubah Suai
+Name[nb]=TDE-standard for tre valgtaster
+Name[nds]=TDE-Standard för 3 Sünnertasten
+Name[ne]=३ परिमार्जक कुञ्जीका लागि पूर्वनिर्धारित TDE
+Name[nl]=TDE-standaard voor 3 modificatietoetsen
+Name[nn]=TDE-standard med tre valtastar
+Name[nso]=Thuso ya Tshoganetso ya TDE ya Dinotlelo tse 3 tsa Kaonafatso
+Name[pa]=3 ਮੋਡੀਫਾਇਰ ਸਵਿੱਚਾਂ ਲਈ TDE ਮੂਲ
+Name[pl]=Ustawienia domyślne TDE dla 3 klawiszy modyfikatorów
+Name[pt]=Predefinição do TDE para 3 Teclas Modificadoras
+Name[pt_BR]=Padrão do TDE para 3 Teclas Modificadoras
+Name[ro]=TDE implicit pentru 3 taste modificator
+Name[ru]=TDE с тремя клавишами-модификаторами
+Name[rw]=Mburabuzi TDE ya Buto 3 Muhindura
+Name[se]=TDE-standárda mas leat golbma válljeboalu
+Name[sk]=TDE nastavenia pre 3 modifikačné klávesy
+Name[sl]=Privzeto za 3 spremenilne tipke
+Name[sr]=TDE подразумевано за 3 модификаторска тастера
+Name[sr@Latn]=TDE podrazumevano za 3 modifikatorska tastera
+Name[sv]=TDE-förinställt med 3 väljartangenter
+Name[tg]=Пешфарзи TDE барои 3 калидҳои ислоҳӣ
+Name[th]=ค่าปริยายของ TDE สำหรับปุ่มเปลี่ยนหน้าที่ 3 ปุ่ม
+Name[tr]=3 Değiştirici Anahtar için TDE Varsayılan
+Name[tt]=TDE üzeneken, 3 Üzgärtkeç Töymä öçen
+Name[uk]=Типова для TDE з 3 модифікаторами
+Name[ven]=Default ya TDE ya khii tharu dzau lugisela
+Name[vi]=Mặc định TDE cho 3 Phím Bổ trợ
+Name[wa]=Pémetou TDE po 3 tapes di candjmints
+Name[xh]=TDE Engagqibekanga ye 3 Izitsixo Mofifier
+Name[zh_CN]=三个修饰键的 TDE 默认值
+Name[zh_TW]=TDE 預設使用 3 個輔助按鍵 (Alt/Ctrl/Shift)
+Name[zu]=Okwendalo kwe-TDE okusetshenziselwa okhiye bokulungisa abangu-3
+Uses Win Modifier=false
+
+[Global Shortcuts]
+Desktop Screenshot=Ctrl+Print
+Enable/Disable Clipboard Actions=Alt+Ctrl+X
+Run Command=Alt+F2
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=Alt+Ctrl+Escape
+Lock Session=Alt+Ctrl+L
+Logout=Alt+Ctrl+Delete
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=Alt+Ctrl+R
+Mouse Emulation=Alt+F12
+Popup Launch Menu=Alt+F1
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=Alt+Ctrl+V
+Show Taskmanager=Ctrl+Escape
+Show Window List=Alt+F5
+Start Screen Saver=Alt+Ctrl+S
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=Ctrl+F1
+Switch to Desktop 10=Ctrl+F10
+Switch to Desktop 11=Ctrl+F11
+Switch to Desktop 12=Ctrl+F12
+Switch to Desktop 13=Ctrl+Shift+F1
+Switch to Desktop 14=Ctrl+Shift+F2
+Switch to Desktop 15=Ctrl+Shift+F3
+Switch to Desktop 16=Ctrl+Shift+F4
+Switch to Desktop 2=Ctrl+F2
+Switch to Desktop 3=Ctrl+F3
+Switch to Desktop 4=Ctrl+F4
+Switch to Desktop 5=Ctrl+F5
+Switch to Desktop 6=Ctrl+F6
+Switch to Desktop 7=Ctrl+F7
+Switch to Desktop 8=Ctrl+F8
+Switch to Desktop 9=Ctrl+F9
+Switch to Next Desktop=none
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Alt+Ctrl+D
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=Ctrl+Tab
+Walk Through Desktop List (Reverse)=Ctrl+Shift+Tab
+Walk Through Desktops=none
+Walk Through Desktops (Reverse)=none
+Walk Through Windows=Alt+Tab
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=Alt+F4
+Window Iconify=none
+Window Lower=none
+Window Maximize=none
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=none
+Window Operations Menu=Alt+F3
+Window Raise=none
+Window Resize=none
+Window Screenshot=Alt+Print
+Window Shade=none
+Window to Desktop 1=none
+Window to Desktop 10=none
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=none
+Window to Desktop 3=none
+Window to Desktop 4=none
+Window to Desktop 5=none
+Window to Desktop 6=none
+Window to Desktop 7=none
+Window to Desktop 8=none
+Window to Desktop 9=none
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+B
+Back=Alt+Left
+Close=Ctrl+W
+Copy=Ctrl+C;Ctrl+Insert
+Cut=Ctrl+X;Shift+Delete
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V;Shift+Insert
+PopupMenuContext=Menu
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=Ctrl+Q
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
diff --git a/kcontrol/keys/unix3.kksrc b/kcontrol/keys/unix3.kksrc
new file mode 100644
index 000000000..8ac722ec6
--- /dev/null
+++ b/kcontrol/keys/unix3.kksrc
@@ -0,0 +1,198 @@
+[Settings]
+Name=UNIX Scheme
+Name[af]=UNIX Tema
+Name[be]=Схема UNIX
+Name[bg]=UNIX
+Name[bn]=ইউনিক্স স্কীম
+Name[br]=Steuñv UNIX
+Name[bs]=UNIX šema
+Name[ca]=Esquema UNIX
+Name[cs]=Unixové schéma
+Name[csb]=Mòtiw Uniksa
+Name[cy]=Cynllun UNIX
+Name[da]=UNIX-system
+Name[de]=UNIX-Design
+Name[el]=UNIX Μορφή
+Name[eo]=Uniksa aranĝo
+Name[es]=Esquema UNIX
+Name[et]=UNIX-i skeem
+Name[eu]=UNIX eskema
+Name[fa]=طرحوارۀ یونیکس
+Name[fi]=UNIX-skeema
+Name[fr]=Thème UNIX
+Name[fy]=UNIX-skema
+Name[ga]=Scéim UNIX
+Name[gl]=Esquema UNIX
+Name[he]=ערכת UNIX
+Name[hr]=UNIX shema
+Name[hu]=UNIX
+Name[id]=Skema UNIX
+Name[is]=UNIX þema
+Name[it]=Schema UNIX
+Name[ja]=UNIX スキーマ
+Name[ka]=UNIX სქემა
+Name[kk]=UNIX сұлбасы
+Name[km]=គំនូរ​បំព្រួញ UNIX
+Name[ko]=UNIX 배열
+Name[lo]=ຊຸດຮູບແບບ KWM
+Name[lt]=UNIX schema
+Name[mk]=UNIX-шема
+Name[mn]=UNIX-Схем
+Name[nb]=UNIX-oppsett
+Name[nds]=UNIX-Vörbild
+Name[ne]=यूनिक्स योजना
+Name[nl]=UNIX-schema
+Name[nn]=UNIX-oppsett
+Name[nso]=Leano la UNIX
+Name[pa]=UNIX ਸਰੂਪ
+Name[pl]=Motyw Uniksa
+Name[pt]=Esquema do UNIX
+Name[pt_BR]=Esquema UNIX
+Name[ro]=Schemă UNIX
+Name[ru]=UNIX
+Name[rw]=Igishushanyombonera UNIX
+Name[se]=UNIX-čoahkkáldat
+Name[sk]=UNIX schéma
+Name[sl]=Shema UNIX
+Name[sr]=UNIX-овска шема
+Name[sr@Latn]=UNIX-ovska šema
+Name[sv]=Unix schema
+Name[tg]=Нақшаи UNIX
+Name[th]=ใช้แบบของ UNIX
+Name[tr]=UNIX Şeması
+Name[tt]=UNIX buyınça
+Name[uk]=Схема UNIX
+Name[uz]=UNIX mavzusi
+Name[uz@cyrillic]=UNIX мавзуси
+Name[ven]=Tshikimu tsha UNIX
+Name[vi]=Phối hợp của Unix
+Name[wa]=Tinme UNIX
+Name[xh]=Udweliso lwe UNIX
+Name[zh_CN]=Unix 方案
+Name[zh_TW]=UNIX 按鍵配置
+Name[zu]=iplani le-UNIX
+Uses Win Modifier=false
+
+[Global Shortcuts]
+Desktop Screenshot=none
+Enable/Disable Clipboard Actions=none
+Run Command=Alt+F2
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=Alt+F9
+Lock Session=Alt+Ctrl+L
+Logout=Alt+Ctrl+Delete
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=Alt+Ctrl+R
+Mouse Emulation=Alt+F12
+Popup Launch Menu=Alt+F1
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=none
+Show Taskmanager=Ctrl+Escape
+Show Window List=none
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=Ctrl+F1
+Switch to Desktop 10=Ctrl+F10
+Switch to Desktop 11=Ctrl+F11
+Switch to Desktop 12=Ctrl+F12
+Switch to Desktop 13=Ctrl+Shift+F1
+Switch to Desktop 14=Ctrl+Shift+F2
+Switch to Desktop 15=Ctrl+Shift+F3
+Switch to Desktop 16=Ctrl+Shift+F4
+Switch to Desktop 2=Ctrl+F2
+Switch to Desktop 3=Ctrl+F3
+Switch to Desktop 4=Ctrl+F4
+Switch to Desktop 5=Ctrl+F5
+Switch to Desktop 6=Ctrl+F6
+Switch to Desktop 7=Ctrl+F7
+Switch to Desktop 8=Ctrl+F8
+Switch to Desktop 9=Ctrl+F9
+Switch to Next Desktop=none
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Alt+Ctrl+D
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=none
+Walk Through Desktop List (Reverse)=Ctrl+Shift+Tab
+Walk Through Desktops=Ctrl+Tab
+Walk Through Desktops (Reverse)=none
+Walk Through Windows=Alt+F11
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=none
+Window Iconify=Alt+F4
+Window Lower=none
+Window Maximize=Alt+Shift+F3
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=Alt+F5
+Window Operations Menu=none
+Window Raise=none
+Window Resize=Alt+F6
+Window Screenshot=none
+Window Shade=none
+Window to Desktop 1=none
+Window to Desktop 10=none
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=none
+Window to Desktop 3=none
+Window to Desktop 4=none
+Window to Desktop 5=none
+Window to Desktop 6=none
+Window to Desktop 7=none
+Window to Desktop 8=none
+Window to Desktop 9=none
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+B
+Back=Alt+Left
+Close=Ctrl+W
+Copy=Ctrl+C
+Cut=Ctrl+X
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+S
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V
+PopupMenuContext=Menu
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=Ctrl+Q
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
diff --git a/kcontrol/keys/win3.kksrc b/kcontrol/keys/win3.kksrc
new file mode 100644
index 000000000..926f83670
--- /dev/null
+++ b/kcontrol/keys/win3.kksrc
@@ -0,0 +1,198 @@
+[Settings]
+Name=Windows Scheme (Without Win Key)
+Name[af]=Venster Skema (Sonder Win Sleutel)
+Name[be]=Схема Windows (без клавішы "Win")
+Name[bg]=Windows (без клавиша Win)
+Name[bn]=উইণ্ডোস্ স্কীম (উইন্ কী ব্যতীত)
+Name[br]=Steuñv Windows (hep stokell Win)
+Name[bs]=Windows šema (bez Win tipke)
+Name[ca]=Esquema Windows (sense la tecla Win)
+Name[cs]=Schéma Windows (bez klávesy Win)
+Name[csb]=Mòtiw Windows (bez klawiszë Win)
+Name[cy]=Cynllun Windows (Heb Allwedd Win)
+Name[da]=Windows-system (uden Win-tast)
+Name[de]=Windows-Design (ohne Windows-Taste)
+Name[el]=Μορφή Windows (Δίχως Win Πλήκτρο)
+Name[eo]=Vindoza aranĝo (sen Vindozoklavo)
+Name[es]=Esquema Windows (Sin tecla Win)
+Name[et]=Windowsi skeem (ilma Win-klahvita)
+Name[eu]=Windows eskema (Win teklarik gabe)
+Name[fa]=طرحوارۀ ویندوز( بدون کلید پنجره)
+Name[fi]=Windows-skeema (ilman Win-näppäintä)
+Name[fr]=Thème Windows (sans la touche « Win »)
+Name[fy]=Windows-skema (sûnder Win-toets)
+Name[ga]=Scéim Windows (Gan Eochair Win)
+Name[gl]=Esquema Windows (Sen Tecla de Windows)
+Name[he]=ערכת חלונות (ללא מקש Win)
+Name[hr]=Windows shema (bez Windows tipki)
+Name[hu]=Windows (Win billentyű nélkül)
+Name[id]=Skema Windows (Tanpa Tombol Win)
+Name[is]=Windowsþema (án Win lykils)
+Name[it]=Schema Windows (senza tasto Win)
+Name[ja]=Windows スキーマ (Win キーなし)
+Name[kk]=Windows сұлбасы (Win пернесіз)
+Name[km]=គំនូរ​បំព្រួញ Windows (គ្មាន​គ្រាប់ចុច​រូប​បង្អួច)
+Name[ko]=윈도 배열 (윈도 키 사용 안함)
+Name[lo]=ຊຸດຮູບແບບວິນໂດ (ບໍ່ມີປຸ່ມ Win)
+Name[lt]=Windows schema (be Win klavišo)
+Name[mk]=Windows-шема (без копчето Win)
+Name[mn]=Windows-Схем (Win-товчгүй)
+Name[ms]=Skim Tetingkap (Tanpa Kekunci Win)
+Name[nb]=Windows-oppsett (uten Windows-tast)
+Name[nds]=Windows-Vörbild (ahn Windows-Tast)
+Name[ne]=विण्डोज योजना (विन कुञ्जी बाहेक)
+Name[nl]=Windows-schema (zonder Win-toets)
+Name[nn]=Windows-oppsett (utan Windows-tast)
+Name[nso]=Leano la Window (Kantle le Senotlelo sa Phenyo)
+Name[pa]=Windows ਸਕੀਮ (ਬਿਨਾਂ Win ਸਵਿੱਚ)
+Name[pl]=Motyw Windows (bez klawisza Win)
+Name[pt]=Esquema do Windows (Sem Tecla Win)
+Name[pt_BR]=Esquema Windows (sem a tecla Win)
+Name[ro]=Schemă Windows (fără tasta Win)
+Name[ru]=Windows (без клавиши Win)
+Name[rw]=Igishushanyombonera cy'Amadirishya (Nta Buto Win)
+Name[se]=Windows-čoakkáldat (Windows-boalu haga)
+Name[sk]=Windows schéma (bez klávesu Win)
+Name[sl]=Shema Windows (brez tipke Win)
+Name[sr]=Windows-ова шема (без тастера Win)
+Name[sr@Latn]=Windows-ova šema (bez tastera Win)
+Name[sv]=Windows schema (utan Win-tangent)
+Name[tg]=Нақшаи тирезаҳо (Бе калиди Win)
+Name[th]=ใช้แบบของวินโดวส์ (ไม่มีปุ่ม Win)
+Name[tr]=Windows Şeması (Win Key'siz)
+Name[tt]=Windows buyınça (Win-töymäsez)
+Name[uk]=Схема Windows (без клавіші Win)
+Name[uz]=Windows qolipi (Win tugmasi bilan)
+Name[uz@cyrillic]=Windows қолипи (Win тугмаси билан)
+Name[ven]=Tshikimu tsha dziWindo (isina Meta/Win-Key)
+Name[vi]=Phối hợp của Windows (không có phím Cửa sổ)
+Name[wa]=Tinme Windows (sins l' tape Win)
+Name[xh]=Window Yodweliso (Ngaphandle kwe Win key)
+Name[zh_CN]=Windows 方案(无 Win 键)
+Name[zh_TW]=Windows 按鍵配置 (無 Win 鍵)
+Name[zu]=Iplani lama-Window (Ngaphandle kukakhiye we-Win)
+Uses Win Modifier=false
+
+[Global Shortcuts]
+Desktop Screenshot=Ctrl+Print
+Enable/Disable Clipboard Actions=none
+Run Command=none
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=none
+Lock Session=none
+Logout=none
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=none
+Mouse Emulation=none
+Popup Launch Menu=Ctrl+Escape
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=none
+Show Taskmanager=Alt+Ctrl+Delete
+Show Window List=none
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=none
+Switch to Desktop 10=none
+Switch to Desktop 11=none
+Switch to Desktop 12=none
+Switch to Desktop 13=none
+Switch to Desktop 14=none
+Switch to Desktop 15=none
+Switch to Desktop 16=none
+Switch to Desktop 2=none
+Switch to Desktop 3=none
+Switch to Desktop 4=none
+Switch to Desktop 5=none
+Switch to Desktop 6=none
+Switch to Desktop 7=none
+Switch to Desktop 8=none
+Switch to Desktop 9=none
+Switch to Next Desktop=Alt+Shift+Tab
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Alt+Ctrl+D
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=none
+Walk Through Desktop List (Reverse)=none
+Walk Through Desktops=Alt+Ctrl+Tab
+Walk Through Desktops (Reverse)=Alt+Ctrl+Shift+Tab
+Walk Through Windows=Alt+Tab
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=Alt+F4
+Window Iconify=none
+Window Lower=none
+Window Maximize=none
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=none
+Window Operations Menu=Alt+Space
+Window Raise=none
+Window Resize=none
+Window Screenshot=Alt+Print
+Window Shade=none
+Window to Desktop 1=none
+Window to Desktop 10=none
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=none
+Window to Desktop 3=none
+Window to Desktop 4=none
+Window to Desktop 5=none
+Window to Desktop 6=none
+Window to Desktop 7=none
+Window to Desktop 8=none
+Window to Desktop 9=none
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+D
+Back=Alt+Left
+Close=Ctrl+F4;Ctrl+W
+Copy=Ctrl+C;Ctrl+Insert
+Cut=Ctrl+X;Shift+Delete
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V;Shift+Insert
+PopupMenuContext=F10
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
diff --git a/kcontrol/keys/win4.kksrc b/kcontrol/keys/win4.kksrc
new file mode 100644
index 000000000..1abb69313
--- /dev/null
+++ b/kcontrol/keys/win4.kksrc
@@ -0,0 +1,198 @@
+[Settings]
+Name=Windows Scheme (With Win Key)
+Name[af]=Windows Skema (Met Win Sleutel)
+Name[be]=Схема Windows (з клавішай "Win")
+Name[bg]=Windows (с клавиша Win)
+Name[bn]=উইণ্ডোস্ স্কীম (উইন্ কী সমেত)
+Name[br]=Steuñv Windows (gant stokell Win)
+Name[bs]=Windows šema (sa Win tipkom)
+Name[ca]=Esquema Windows (amb la tecla Win)
+Name[cs]=Schéma Windows (s klávesou Win)
+Name[csb]=Mòtiw Windows (z klawiszą Win)
+Name[cy]=Cynllun Windows (Gyda'r Allwedd Win)
+Name[da]=Windows-system (med Win-tast)
+Name[de]=Windows-Design (mit Windows-Taste)
+Name[el]=Μορφή Windows (Με Win Πλήκτρο)
+Name[eo]=Vindoza aranĝo (kun Vindozoklavo)
+Name[es]=Esquema Windows (Con tecla Win)
+Name[et]=Windowsi skeem (Win-klahviga)
+Name[eu]=Windows eskema (Win teklarekin)
+Name[fa]=طرحوارۀ پنجره( با کلید پنجره)
+Name[fi]=Windows-skeema (Win-näppäimellä)
+Name[fr]=Thème Windows (avec la touche « Win »)
+Name[fy]=Windows-skema (mei Win-toets)
+Name[ga]=Scéim Windows (Le hEochair Win)
+Name[gl]=Esquema de Windows (Con Tecla de Windows)
+Name[he]=ערכת חלונות (עם מקש Win)
+Name[hr]=Windows shema (s Windows tipkama)
+Name[hu]=Windows (Win billentyűvel)
+Name[id]=Skema Windows (Dengan Tombol Win)
+Name[is]=Windowsþema (með Win lykli)
+Name[it]=Schema Windows (con tasto Win)
+Name[ja]=Windows スキーマ (Win キーあり)
+Name[ka]=Windows სქემა (Win კლავიშით)
+Name[kk]=Windows сұлбасы (Win пернемен)
+Name[km]=គំនូរ​បំព្រួញ Windows (មាន​គ្រាប់ចុច​រូប​បង្អួច)
+Name[ko]=윈도 배열 (윈도 키 사용)
+Name[lo]=ຊຸດຮູບແບບວິນໂດ (ມີປຸ່ມ Win)
+Name[lt]=Windows schema (su Win klavišu)
+Name[mk]=Windows-шема (со копчето Win)
+Name[mn]=Windows-Схем (Win-Товчтой)
+Name[nb]=Windows-oppsett (med Windows-tast)
+Name[nds]=Windows-Vörbild (mit Windows-Tast)
+Name[ne]=विण्डोज योजना (विन कुञ्जीसँग)
+Name[nl]=Windows-schema (met Win-toets)
+Name[nn]=Windows-oppsett (med Windows-tast)
+Name[nso]=Leano la Window (Le Senotlelo sa Phenyo)
+Name[pa]=Windows ਸਕੀਮ (Win ਸਵਿੱਚ ਨਾਲ)
+Name[pl]=Motyw Windows (z klawiszem Win)
+Name[pt]=Esquema do Windows (Sem Tecla Win)
+Name[pt_BR]=Esquema Windows (com a tecla Win)
+Name[ro]=Schemă Windows (cu tasta Win)
+Name[ru]=Windows (поддержка клавиши Win)
+Name[rw]=Igishushanyombonera cy'Amadirishya (Na Buto Win)
+Name[se]=Windows-čoakkáldat (Windows-boaluin)
+Name[sk]=Windows schéma (s klávesom Win)
+Name[sl]=Shema Windows (s tipko Win)
+Name[sr]=Windows-ова шема (са тастером Win)
+Name[sr@Latn]=Windows-ova šema (sa tasterom Win)
+Name[sv]=Windows schema (med Win-tangent)
+Name[tg]=Нақшаи тирезаҳо (Бо калиди Win)
+Name[th]=ใช้แบบของวินโดวส์ (มีปุ่ม Win)
+Name[tr]=Windows Şeması (Win Key İle)
+Name[tt]=Windows buyınça (Win-töymäle)
+Name[uk]=Схема Windows (з клавішею Win)
+Name[uz]=Windows qolipi (Win tugmasiz)
+Name[uz@cyrillic]=Windows қолипи (Win тугмасиз)
+Name[ven]=TShikimu tsha dziwindo (irena Meta/Win-Key)
+Name[vi]=Phối hợp của Windows (có phím Cửa sổ)
+Name[wa]=Tinme Windows (avou l' tape Win)
+Name[xh]=Windows Ezingagqibekanga (Nge Win-key)
+Name[zh_CN]=Windows 方案(有 Win 键)
+Name[zh_TW]=Windows 按鍵配置 (有 Win 鍵)
+Name[zu]=Iplani lama-Window (Kukhona ukhiye we-Win)
+Uses Win Modifier=true
+
+[Global Shortcuts]
+Desktop Screenshot=Print
+Enable/Disable Clipboard Actions=none
+Run Command=Win+R
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=none
+Lock Session=none
+Logout=none
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=none
+Mouse Emulation=none
+Popup Launch Menu=Ctrl+Escape
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=none
+Show Taskmanager=Alt+Ctrl+Delete
+Show Window List=none
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=Win+F1
+Switch to Desktop 10=Win+F10
+Switch to Desktop 11=none
+Switch to Desktop 12=none
+Switch to Desktop 13=none
+Switch to Desktop 14=none
+Switch to Desktop 15=none
+Switch to Desktop 16=none
+Switch to Desktop 2=Win+F2
+Switch to Desktop 3=Win+F3
+Switch to Desktop 4=Win+F4
+Switch to Desktop 5=Win+F5
+Switch to Desktop 6=Win+F6
+Switch to Desktop 7=Win+F7
+Switch to Desktop 8=Win+F8
+Switch to Desktop 9=Win+F9
+Switch to Next Desktop=none
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Win+D;Win+M
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=none
+Walk Through Desktop List (Reverse)=none
+Walk Through Desktops=Win+Tab
+Walk Through Desktops (Reverse)=Win+Shift+Tab
+Walk Through Windows=Alt+Tab
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=Alt+F4
+Window Iconify=none
+Window Lower=none
+Window Maximize=none
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=none
+Window Operations Menu=Alt+Space
+Window Raise=none
+Window Resize=none
+Window Screenshot=Alt+Print
+Window Shade=none
+Window to Desktop 1=none
+Window to Desktop 10=none
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=none
+Window to Desktop 3=none
+Window to Desktop 4=none
+Window to Desktop 5=none
+Window to Desktop 6=none
+Window to Desktop 7=none
+Window to Desktop 8=none
+Window to Desktop 9=none
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+D
+Back=Alt+Left
+Close=Ctrl+F4;Ctrl+W
+Copy=Ctrl+C;Ctrl+Insert
+Cut=Ctrl+X;Shift+Delete
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V;Shift+Insert
+PopupMenuContext=F10
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
diff --git a/kcontrol/keys/wm3.kksrc b/kcontrol/keys/wm3.kksrc
new file mode 100644
index 000000000..6c6ef61e5
--- /dev/null
+++ b/kcontrol/keys/wm3.kksrc
@@ -0,0 +1,188 @@
+[Settings]
+Name=WindowMaker (3 Modifier Keys)
+Name[af]=WindowMaker (3 verandering sleutels)
+Name[be]=WindowMaker (тры клавішы мадыфікацыі)
+Name[bg]=WindowMaker (с 3 модификационни клавиша)
+Name[bn]=উইণ্ডো-মেকার (৩-টি মডিফায়ার কী)
+Name[bs]=WindowMaker (3 modificirajuće tipke)
+Name[ca]=WindowMaker (3 tecles modificadores)
+Name[cs]=WindowMaker (3 modifikátory)
+Name[csb]=WindowMaker (3 klawisze zjinaczi)
+Name[cy]=WindowMaker (3 Bysell Addasu)
+Name[da]=Windowmaker (3 modifikatortaster)
+Name[de]=WindowMaker (3 Sondertasten)
+Name[el]=WindowMaker (3 πλήκτρα αλλαγής)
+Name[eo]=WindoMaker (3 modifaj klavoj)
+Name[es]=WindowMaker (3 teclas de modificación)
+Name[et]=WindowMaker (3 muuteklahviga)
+Name[eu]=WindowMaker (3 tekla modifikatzailekin)
+Name[fa]=WindowMaker (۳کلید تغییردهندۀ)
+Name[fi]=WindowMaker (3 muokkausnäppäintä)
+Name[fr]=WindowMaker (3 touches de modifications)
+Name[fy]=WindowMaker (3 modifikaasjetoetsen)
+Name[ga]=WindowMaker (3 Eochair Mhionathraithe)
+Name[gl]=WindowMaker (3 Teclas Modificadoras)
+Name[he]=WindowMaker (עם שלושה מצבים)
+Name[hr]=WindowMaker (3 modifikatorske tipke)
+Name[hu]=WindowMaker (3 módosító billentyű)
+Name[is]=WindowMaker (3 breytilyklar)
+Name[it]=WindowMaker (3 tasti modificatori)
+Name[ja]=WindowMaker (3 モディファイアキー)
+Name[ka]=WindowMaker (3 ცვლადი კლავიში)
+Name[kk]=WindowMaker (3 түрлендіру перне)
+Name[km]=WindowMaker (គ្រាប់ចុច​កែប្រែ ៣)
+Name[ko]=WindowMaker (수정자 키 세 개)
+Name[lt]=WindowMaker (3 klavišai - modifikatoriai)
+Name[mk]=WindowMaker (3 копчиња-модификатори)
+Name[mn]=WindowMaker (3 сэлгүүр товчилуур)
+Name[nb]=WindowMaker (tre valgtaster)
+Name[nds]=WindowMaker (3 Sünnertasten)
+Name[ne]=विण्डोज निर्माता (३ परिमार्जक कुञ्जीहरू)
+Name[nl]=WindowMaker (3 modificatietoetsen)
+Name[nn]=WindowMaker (tre valtastar)
+Name[pa]=WindowMaker (3 ਸੋਧ ਸਵਿੱਚਾਂ)
+Name[pl]=WindowMaker (3 klawisze modyfikatorów)
+Name[pt]=WindowMaker (3 Teclas Modificadoras)
+Name[pt_BR]=WindowMaker (3 teclas modificadoras)
+Name[ro]=WindowMaker (3 taste modificator)
+Name[ru]=WindowMaker (3 клавиши-модификатора)
+Name[rw]=MukoraDirishya (Muhindura Buto 3)
+Name[se]=WindowMaker (golbma válljenboaluiguin)
+Name[sk]=WindowMaker (3 modifikačné klávesy)
+Name[sl]=WindowMaker (3 spremenilne tipke)
+Name[sr]=WindowMaker (3 модификаторска тастера)
+Name[sr@Latn]=WindowMaker (3 modifikatorska tastera)
+Name[sv]=Windowmaker (3 väljartangenter)
+Name[tg]=СозандаиТиреза (3 калиди ислоҳ)
+Name[th]=วินโดวเมคเกอร์ (ใช้ปุ่มเปลี่ยนหน้าที่ 3ปุ่ม)
+Name[tr]=WindowMaker (3 Değiştirici Anahtar)
+Name[tt]=WindowMaker (3 Üzgärtkeç Töymä)
+Name[uk]=WindowMaker (3 модифікатори)
+Name[vi]=WindowMaker (3 Phím Bổ trợ)
+Name[wa]=WindowMaker (3 tapes di candjmint)
+Name[zh_CN]=WindowMaker (三个修饰键)
+Name[zh_TW]=WindowMaker (3 個輔助按鍵)
+
+[Global Shortcuts]
+Desktop Screenshot=Ctrl+Print
+Enable/Disable Clipboard Actions=Alt+Ctrl+X
+Run Command=Alt+F2
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=Alt+Ctrl+Escape
+Lock Session=Alt+Ctrl+L
+Logout=Alt+Ctrl+Delete
+Logout without Confirmation=none
+Manually Invoke Action on Current Clipboard=Alt+Ctrl+R
+Mouse Emulation=Alt+F12
+Popup Launch Menu=Alt+F1
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=Alt+Ctrl+V
+Show Taskmanager=Ctrl+Escape
+Show Window List=Alt+F5
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch to Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=Alt+1
+Switch to Desktop 10=Alt+Shift+1
+Switch to Desktop 11=Alt+Shift+2
+Switch to Desktop 12=Alt+Shift+3
+Switch to Desktop 13=Alt+Shift+4
+Switch to Desktop 14=Alt+Shift+5
+Switch to Desktop 15=Alt+Shift+6
+Switch to Desktop 16=Alt+Shift+7
+Switch to Desktop 2=Alt+2
+Switch to Desktop 3=Alt+3
+Switch to Desktop 4=Alt+4
+Switch to Desktop 5=Alt+5
+Switch to Desktop 6=Alt+6
+Switch to Desktop 7=Alt+7
+Switch to Desktop 8=Alt+8
+Switch to Desktop 9=Alt+9
+Switch to Next Desktop=none
+Switch to Previous Desktop=none
+Toggle Showing Desktop=Alt+Ctrl+D
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=Ctrl+Tab
+Walk Through Desktop List (Reverse)=Ctrl+Shift+Tab
+Walk Through Desktops=none
+Walk Through Desktops (Reverse)=none
+Walk Through Windows=Alt+Tab
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=Alt+Escape
+Window Iconify=none
+Window Lower=none
+Window Maximize=none
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=none
+Window Operations Menu=Alt+F3
+Window Raise=none
+Window Resize=none
+Window Screenshot=Alt+Print
+Window Shade=none
+Window to Desktop 1=Alt+Ctrl+1
+Window to Desktop 10=Alt+Ctrl+Shift+1
+Window to Desktop 11=Alt+Ctrl+Shift+2
+Window to Desktop 12=Alt+Ctrl+Shift+3
+Window to Desktop 13=Alt+Ctrl+Shift+4
+Window to Desktop 14=Alt+Ctrl+Shift+5
+Window to Desktop 15=Alt+Ctrl+Shift+6
+Window to Desktop 16=Alt+Ctrl+Shift+7
+Window to Desktop 2=Alt+Ctrl+2
+Window to Desktop 3=Alt+Ctrl+3
+Window to Desktop 4=Alt+Ctrl+4
+Window to Desktop 5=Alt+Ctrl+5
+Window to Desktop 6=Alt+Ctrl+6
+Window to Desktop 7=Alt+Ctrl+7
+Window to Desktop 8=Alt+Ctrl+8
+Window to Desktop 9=Alt+Ctrl+9
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+B
+Back=Alt+Left
+Close=Ctrl+W
+Copy=Ctrl+C;Ctrl+Insert
+Cut=Ctrl+X;Shift+Delete
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V;Shift+Insert
+PopupMenuContext=Menu
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=Ctrl+Q
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus