Commit Graph
23 Commits
Author SHA1 Message Date
John Scipione a073305c96 keymap: limit set of left/right swap options
For Shift, Control, Option, and Command assume that you want to shift
on the same side, left-for-left, right-for-right. The Menu key is
available on either the left or right side, and lock keys can be
swapped with any other modifier left or right.

If we have multiple unmapped modifiers we need to do a little extra
work to figure out which of the unmapped modifiers to swap with.

Convert private class member methods to static functions.

Also update copyright info
2014-02-20 15:18:37 -05:00
Humdinger f6c5dbf81c Some more code style corrections of Keymap. 2014-01-03 19:44:12 +01:00
John Scipione 7889cac6cf Keymap: Add Defaults button to revert keymap
Fixes #9980

Since hrev44455 we save your modifier keys settings when you switch
keymaps so you could get your modifiers keys messed up and unable to
get back to normal. This Defaults button allows you to override all
that and go back to the default US-International keymap with default
modifiers so you can start with a fresh slate and set things up the
way you want.

Also moved Revert button to the left side next to the Defaults button.
We do this on other preflets, the right side is reserved for an Apply
or OK button, and, if the preflet doesn't have one, is left empty.
2013-09-26 19:37:06 -04:00
John Scipione f5ac2da0a8 Adds a dialog to the Keymap preference app to more easily and
reliably change your modifier keys.

The dialog box is shown by selecting the new 'Set Modifier Keys...'
option under the File menu. This brings up a window which contains 4
dialog boxes labeled: Caps Lock, Control, Option, and Command.

Each of the labels in followed by a drop down box which allows you to select
from one of the other keys listed. So for instance you could switch the Caps
Lock and Control keys but selecting the 'Control' option next to Caps Lock and
the 'Caps Lock' option next to Control.

The Caps Lock menu has an additional option which I find appealing...
'Disable' which, as it sounds, disables your Caps Lock key.

At the bottom of the dialog there are 3 buttons, 'Cancel', 'Revert', and 'Ok'.
'Cancel' and 'Ok' are self explanatory. The 'Revert' button, which is
initially disabled, puts you back into the state that you were when you first
opened the dialog.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-07 13:49:56 +00:00
John Scipione 08cd4bc208 Add 3 new Apple Aluminum keyboard layout files and update and rename the
existing 'Apple Aluminium' keyboard layout to 'Apple Aluminium Extended
International.' The 3 new layout files are US mini and extended version
as well as an international mini version. This completes #7964

International corresponds to keyboard layouts for all locales except the US
and Japan. I have Japanese Apple Aluminum keyboard layout files almost
ready but I first need to determine what the special kana and eisu keys
are mapped to.

The Apple Aluminum keyboard layout files are tucked away in an Apple Aluminum
subdirectory. The Keymap preference app has been modified to turn
subdirectories into submenus of the Layout menu.

HaikuImage has been modified to include each keyboard layout file in the 
image individually as recommended by Ingo.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 04:30:44 +00:00
Axel Dörfler b01bdb48ea * The Keymap preferences app will now memorize its window frame and chosen
layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-18 12:50:57 +00:00
Oliver Tappe aa0f32cfbd * removed KeymapMessageFilter, as it is no longer needed
* fixed a couple of issues with respect to internal/external naming of 
  keymaps and the respective files, hopefully such that there's always one
  keymap active in the view: either one that has been selected or (Current)
  if any changes have been applied
* replaced the dead-key-menubar with a menufield (thanks Axel, looking much
  better)
cleanup:
* removed remnants of Use-button (message constant and switch-case)
* dropped 'Save' menu item, as it wasn't implemented anyway and would now
  never be enabled
* removed fFirstTime, as it caused problems, but did not serve any purpose
  anymore


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30734 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 22:58:09 +00:00
Oliver Tappe cf38cb6974 * should have been part of r30723
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30724 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 19:52:51 +00:00
Oliver Tappe 83936c1c26 * Added support for selecting the dead key trigger characters from a menubar,
offering two choices for acute and diaeresis as well as allowing to switch
  off each dead key completely.
* moved the textview on a line of its own such that the dead key menu and
  the modifier-switching button live together on one line
* added enum dead_key_index and used it at a couple of places instead of
  having to use the magic numbers 1-5
* refactored the actual updating of the fChars buffer from SetKey() into
  _SetChars(), which is now being invoked by SetDeadKeyTrigger(), too

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 18:31:17 +00:00
Axel Dörfler 6db2be327d * Changed the way the shortcuts are switched: we no longer do the same thing
as BeOS on the right side (that is, switching control and option key), but
  switch control and command there as well.
* As a consequence, the Alt-Gr key will stay where it is when switching the
  shortcuts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 13:00:51 +00:00
Axel Dörfler ebe98045d7 * Added ability to change modifier keys (per drag and drop).
* Added button to switch shortcut modifier keys.
* Added option to make the KeyboardLayoutView non-editable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-30 13:19:11 +00:00
Axel Dörfler 0a39e39616 * Add capability to load other keyboard layouts from disk. It even works :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 23:11:18 +00:00
Axel Dörfler 495c8b848b * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 16:44:54 +00:00
Axel Dörfler 6b9767aa8a * The text control is now back - instead of overwriting BTextView::KeyDown(),
we now use a plain BTextControl, and a custom message filter. For some reason,
  BHandler::AddFilter() does not work, though, this needs some investigation.
* Enabled the font menu again, the font in the text control is changed as well.
* Made the default window size a bit smaller on large screens.
* Scrolling to the selection does not seem to work before Show() - looks like
  a bug in the layout implementation.
* Moved some methods around to match their declaration order.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 13:52:54 +00:00
Axel Dörfler e4aad26fec * While the new stuff isn't really ready for prime time, I've switched over
to it now (also to get some comments). It already looks better than the old
  one, at least.
* The KeymapWindow is now using our layout engine.
* Removed the old MapView.
* Do you think the text view is necessary? And the ability to switch the font?
  (I've removed both for now, comments welcome)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-24 22:12:31 +00:00
Alexandre Deckner 7a249e96f5 Few fixes to the keymap preflet to make it good enough for the alpha 1. Lots of
things could be rewritten in a cleaner way but i'd rather finish my keymap 
management patch as i rewrote the preflet for it anyway. For example the '(Current)' 
item shouldn't be needed anymore but is still there in case the keymap:name attribute 
read fails or if the original keymap file doesn't exist anymore (for example, applying 
a user keymap, quiting the preflet, deleting the keymap file, and reloading the 
preflet)  

* Revert/apply data wasn't correctly loaded when the first load was on a system 
keymap. This would allow revert/apply right after starting the preflet. That was the 
cause of #2659.
* fCurrentMapName wasn't updated after a Revert or Apply
* Select the active keymap in the lists after reverting.

Quick cosmetical fix follows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 11:50:45 +00:00
Rene Gollent 487171f0b9 Keymap preferences now saves an attribute on the Key_map file to indicate
what keymap it came from. This allows us to indicate the current keymap in
the list views. I'm not sure how to get the build system to populate that
attribute by default though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 03:28:12 +00:00
Alexandre Deckner 793fb95c82 * not a "chef d'oeuvre" but revert and apply buttons should behave as
expected now
* removed some dead code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-29 16:17:18 +00:00
Alexandre Deckner ad93c2f5eb * style cleanup, new style casts, license header updates
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 13:36:46 +00:00
Alexandre Deckner c8f93d1843 * rewrote drawing to use an offscreen view
* made keys move down when pressed
* reduced font size of locks light's text to fit in

This fixes #251, style cleanup will follow


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 10:08:27 +00:00
Jérôme Duval 127e973b5d fixed build for non haiku targets
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-15 20:30:13 +00:00
Jérôme Duval a2618d1f22 clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-23 11:28:52 +00:00
Axel Dörfler a10cf76ef5 Renamed src/prefs to "preferences", as the directory is usually called in BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 15:57:12 +00:00