History log of /haiku/src/preferences/keymap/KeyboardLayoutView.h
Revision Date Author Comments
# 2aa85f5f 27-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

VirtualKeyboard: Fold KeyboardLayoutView back into the Keymap preferences one.

Only one #ifdef, the rest is all in basic if-tests. Relatively minimal changes,
and now the virtual keyboard device gets all the improvements made to the keyboard
layout view over the last 6 years.


# 371b3b2b 24-Feb-2020 X512 <danger_mail@list.ru>

Keymap: remove flickering workarounds, small fixes

Part of #15623.

Change-Id: I44d62a39efeaa25ecdc3b8a9aa27ca9fef33e5b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2279
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# a44b74d5 20-Feb-2014 John Scipione <jscipione@gmail.com>

Keymap: static functions back to private methods


# a073305c 19-Feb-2014 John Scipione <jscipione@gmail.com>

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


# 8eb27eaa 04-Sep-2013 John Scipione <jscipione@gmail.com>

Keymap: Allow you to unset modifier keys

Selecting the marked menu item will unset the mapping for that modifier.

We can't rely on there being a unique mapping for a key (more than one
could be set to 0 aka unset) so we have to set the menu item names based
on the interface defs constants intead.


# ab0f7d66 04-Sep-2013 John Scipione <jscipione@gmail.com>

Keymap: activate popup for all modifiers

not just those that have a modifier key mapped to them already

Also check for control+click == RMB


# 173b5a68 10-May-2013 John Scipione <jscipione@gmail.com>

Keymap: swap modifiers keys via context menu

When the user right clicks on a modifier key pop up a menu listing the
available modifiers. When the user selects a modifier from the menu swap
the key with the selected modifier. This provides an alternative way to swap
modifier keys other than drag&drop that works for just modifier keys.


# 8f62243f 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fix warnings in Keymap preflet about hidden virtual by renaming SetFont()
to SetBaseFont() (and fFont to fBaseFont)
* enabled -Werror for all preflets


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38203 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e0ae658a 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments - no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38201 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b11d8c83 03-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Some keymap labels now have an abbreviated version that is used when the key
gets too small for the full text.
* This closes enhancement ticket #4024.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 246d3119 13-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* fixed coding style issues

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30751 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d47410e0 13-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* avoid key highlighting unless the preflet window is active, at least
I've found it pretty silly that the Keymap preflet would document all my
keypresses although I'm doing something elsewhere

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30745 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83656437 10-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* dead keys can now be enabled/disabled via middle mouse button
* fDragKey must be reset in MouseUp() as otherwise it is not possible to
drag a key from one keymap to the textview and then from the textview to the
same key of another keymap
* _HandleDeadKey() now ignores modifier keys as otherwise dead keys that
required pressing a modifier (like the tilde on the German keyboard) failed
to highlight the resulting characters
What's still missing is a way to edit the resulting characters for each dead key, but I am not yet sure how to do that in an elegant way

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afa564ec 05-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the modifiers sticky when used with the mouse. This greatly improves
changing keymaps this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29930 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebe98045 30-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* 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


# a6ad872b 27-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Works around a race condition/bug/design issue in our layout engine:
sometimes the size isn't set in AttachedToWindow() yet, and the first
FrameResized() comes after the first Draw(). We now relayout in Draw()
in case the size changed since last time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29748 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16dc221d 27-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Now uses an offscreen bitmap for flicker free drawing.
* Only trigger a redraw on B_MODIFIER_CHANGED if something actually changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1996fdf 26-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed regression; the key labels could be drawn out of the button border.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29735 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 681c2e44 25-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

The button and menu field draw routines take a background color into account,
which makes the resessed frame blend better with the surroundings. This can
be seen best in Keymap, where a different color is set on some buttons, but
the resessed frame should still be the same across all those buttons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29716 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a869d32e 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The L-shaped "enter" key can now also be drawn almost right (uses
BControlLook plus some clipping to do its magic).
* Fixed scancode only mode of the keyboard layout view.
* Fixed filter thanks to Rene.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29712 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3c394ad8 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added support for LED status indicators.
* The look isn't perfect yet, but well; improvements welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84e80da0 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The default drag&drop action is now copy, if you drag with the second mouse
button, you switch the keys.
* Switching the same key with different modifiers held works now.
* The drop target is now reevaluated when a modifier key is pressed, as the
key originating the drag cannot be its target (but only with the same
modifiers pressed).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29704 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6aa7b635 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The message filter now does not do anything anymore when the source keymap
matches his own (field now added to the KeyboardLayoutView fake B_KEY_DOWN
messages).
* The default action for keyboard to keyboard drag&drop is to switch the keys
now.
* When a key is overwritten by a drop, the old key is now sent to the text
view, so that it's not lost (if that was a mistake you can now easily revert
it without having to press the "Revert" button and lose all changes).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29702 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be09c2a1 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Now handles dead keys via the mouse as well.
* Added _InvalidateKey() variant.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53c926be 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added the ability to set a target that will receive fake B_KEY_DOWN
messages generated when pressing the keys.
* The font size is now adapted to match the key size better, maximum size is
the current plain font.
* The keys you drag around now generate a useful B_MIME_DATA message, that other
views can accept as well.
* Implemented support for changing the keymap via drag&drop.
* Added SetFont() method to change the font used by the keys.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29697 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 13975ae8 24-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

Another work-in-progress commit:
* Started working on dragging keys around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29683 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ba65ba1 24-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Another work-in-progress commit: added dead key handling, started mouse
interaction, draw symbols differently.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29672 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 42176b84 23-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Work in progress commit of the Keymap rework. Should not disturb the
existing code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a44b74d5450eaf36dd9c69f5731bc3ff8b505485 20-Feb-2014 John Scipione <jscipione@gmail.com>

Keymap: static functions back to private methods


# a073305c9669e9a76db294148e6eef1e5ceb2d5e 19-Feb-2014 John Scipione <jscipione@gmail.com>

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


# 8eb27eaa797ad24b843fca7c4047f0709eeb49af 04-Sep-2013 John Scipione <jscipione@gmail.com>

Keymap: Allow you to unset modifier keys

Selecting the marked menu item will unset the mapping for that modifier.

We can't rely on there being a unique mapping for a key (more than one
could be set to 0 aka unset) so we have to set the menu item names based
on the interface defs constants intead.


# ab0f7d6627fe32e98d4713352896f2a7f66f9854 04-Sep-2013 John Scipione <jscipione@gmail.com>

Keymap: activate popup for all modifiers

not just those that have a modifier key mapped to them already

Also check for control+click == RMB


# 173b5a686d834bb354bce8e1ac00e587d0ede4c2 10-May-2013 John Scipione <jscipione@gmail.com>

Keymap: swap modifiers keys via context menu

When the user right clicks on a modifier key pop up a menu listing the
available modifiers. When the user selects a modifier from the menu swap
the key with the selected modifier. This provides an alternative way to swap
modifier keys other than drag&drop that works for just modifier keys.


# 8f62243f372b69918512816a43173b5456c764b9 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fix warnings in Keymap preflet about hidden virtual by renaming SetFont()
to SetBaseFont() (and fFont to fBaseFont)
* enabled -Werror for all preflets


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38203 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e0ae658ae2f8f3163a558ca438e55c09712ac7bb 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments - no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38201 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b11d8c839f8243b4f181e48fb947b45bfd29b594 03-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Some keymap labels now have an abbreviated version that is used when the key
gets too small for the full text.
* This closes enhancement ticket #4024.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 246d3119ea88323c2c8a90a9eb0feb1e35a06510 13-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* fixed coding style issues

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30751 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d47410e075e44a445429f3f8d83bc7fdaf6bdbd0 13-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* avoid key highlighting unless the preflet window is active, at least
I've found it pretty silly that the Keymap preflet would document all my
keypresses although I'm doing something elsewhere

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30745 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83656437205323cf56b5e6a30dfd6e2f135f2ab8 10-May-2009 Oliver Tappe <zooey@hirschkaefer.de>

* dead keys can now be enabled/disabled via middle mouse button
* fDragKey must be reset in MouseUp() as otherwise it is not possible to
drag a key from one keymap to the textview and then from the textview to the
same key of another keymap
* _HandleDeadKey() now ignores modifier keys as otherwise dead keys that
required pressing a modifier (like the tilde on the German keyboard) failed
to highlight the resulting characters
What's still missing is a way to edit the resulting characters for each dead key, but I am not yet sure how to do that in an elegant way

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afa564ec96a22e86eb1beb88797c74150b4ecbaa 05-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the modifiers sticky when used with the mouse. This greatly improves
changing keymaps this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29930 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebe98045d7383cee5d80c918eb5667b7b9106181 30-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* 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


# a6ad872b60672571da2d25718c7b21f13656e7d9 27-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Works around a race condition/bug/design issue in our layout engine:
sometimes the size isn't set in AttachedToWindow() yet, and the first
FrameResized() comes after the first Draw(). We now relayout in Draw()
in case the size changed since last time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29748 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16dc221d20428a0c064cfcf67c786d7d93c44d6b 27-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Now uses an offscreen bitmap for flicker free drawing.
* Only trigger a redraw on B_MODIFIER_CHANGED if something actually changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1996fdfd6ce01e871881d7d0fcbd429a3ebdcf5 26-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed regression; the key labels could be drawn out of the button border.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29735 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 681c2e4425073000c01c9c97237d2615d226f401 25-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

The button and menu field draw routines take a background color into account,
which makes the resessed frame blend better with the surroundings. This can
be seen best in Keymap, where a different color is set on some buttons, but
the resessed frame should still be the same across all those buttons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29716 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a869d32e0c005b398bc43a8c1078fd2d49dc2a9d 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The L-shaped "enter" key can now also be drawn almost right (uses
BControlLook plus some clipping to do its magic).
* Fixed scancode only mode of the keyboard layout view.
* Fixed filter thanks to Rene.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29712 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3c394ad89e45ef9bb698e6b1305bb48185a2d913 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added support for LED status indicators.
* The look isn't perfect yet, but well; improvements welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84e80da081742c5f169eea3c30529c0c41a089e5 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The default drag&drop action is now copy, if you drag with the second mouse
button, you switch the keys.
* Switching the same key with different modifiers held works now.
* The drop target is now reevaluated when a modifier key is pressed, as the
key originating the drag cannot be its target (but only with the same
modifiers pressed).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29704 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6aa7b63552467c8fa8d12f486b90d31352216676 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The message filter now does not do anything anymore when the source keymap
matches his own (field now added to the KeyboardLayoutView fake B_KEY_DOWN
messages).
* The default action for keyboard to keyboard drag&drop is to switch the keys
now.
* When a key is overwritten by a drop, the old key is now sent to the text
view, so that it's not lost (if that was a mistake you can now easily revert
it without having to press the "Revert" button and lose all changes).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29702 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be09c2a190dd15c39ec1d1c4427f493e77723eb1 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Now handles dead keys via the mouse as well.
* Added _InvalidateKey() variant.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53c926befb63cac7484b1c3459c529a7ac38d0d1 25-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added the ability to set a target that will receive fake B_KEY_DOWN
messages generated when pressing the keys.
* The font size is now adapted to match the key size better, maximum size is
the current plain font.
* The keys you drag around now generate a useful B_MIME_DATA message, that other
views can accept as well.
* Implemented support for changing the keymap via drag&drop.
* Added SetFont() method to change the font used by the keys.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29697 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 13975ae8b8db1feddbc3e22c3cfd3d4ce06325aa 24-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

Another work-in-progress commit:
* Started working on dragging keys around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29683 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ba65ba1b4e7129240fe6756087e600e6952efa5 24-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Another work-in-progress commit: added dead key handling, started mouse
interaction, draw symbols differently.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29672 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 42176b84a4423efa3f50629e0ed673be491fdb14 23-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Work in progress commit of the Keymap rework. Should not disturb the
existing code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29666 a95241bf-73f2-0310-859d-f6bbb57e9c96