#
4fc18643 |
|
04-Dec-2023 |
John Scipione <jscipione@gmail.com> |
Keymap: Put status icons inside menu fields Draw warning and stop icons on top of the menu fields instead. Remove conflict views, create a new file to hold StatusMenuField and StatusMenuItem. Set the icon with them instead. Change-Id: If6c00199f24ac4f4fc789f12cc6cdcd7a912418f Reviewed-on: https://review.haiku-os.org/c/haiku/+/7209 Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
|
#
0b3890fe |
|
04-Dec-2023 |
John Scipione <jscipione@gmail.com> |
Keymap: Fix Modifier Keys window regressions from hrev57267 Fix _DuplicateKeys() conflict check for Caps Lock to ignore right side. - Create kUnset constant set to 0 so it's clear what's going on. - Create kDisabled constant set to -1 for that case. - Declare loop variables one time out of loop scope, uint => int for -1. Fix _MarkMenuItem() warnings icon check. We should get a yellow warning icon if your left and right modifiers don't match (except on Caps Lock). Create an _UpdateStatus() method that calls the other methods we need. Reverse the placement of the Revert and Cancel buttons. Cancel goes just to the left of the OK button and Revert goes all the way left. Restore _HideShowStatusIcons(), this is used to push the menu fields over when there is no conflict. _ToggleStatusIcon() convenience method. The key role is called "Caps Lock" not just Caps. Method and variable names are fine, but the " Lock" part is important in the label. Also use "Caps Lock key" instead of just "Caps Lock" for the menu field value. We use " key" at the end for the other cases to differentiate them from the role label. Minor nitpicks: - Change comment variable name to label. I understand that it says B_TRANSLATE_COMMENT, but it's a label, the comment is for i18n. - Fix same method declaration style, and in header. - Add 2 new lines after pragma instead of 1 Change-Id: I194e69486310a249d0ef2d5d5977ae69954e9a27 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7179 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
d51ee1e8 |
|
16-Aug-2023 |
Jorge Acereda <jacereda@gmail.com> |
Keymap: Add caps modifiers remapping Refactored some functions. Change-Id: Idb16b1298fcd8f2fbca256275d16fbc3584bdb55 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6842 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
73ee1578 |
|
20-Feb-2014 |
John Scipione <jscipione@gmail.com> |
Keymap: Hide/show warning/stop icon views
|
#
2943ba13 |
|
21-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Add warning icon. That shows when the left and right side key roles don't match. e.g. The left control key has a different key role than the right control key. The warning doesn't actually stop you from setting the modifier keys though. Add tooltips on the warning and stop icons explaining the problem. Also a couple minor style fixes.
|
#
b87ee2bf |
|
19-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Conflict if either left or right ... key doesn't match rather than requiring both left and right keys to not match for a conflict. Also update copyright year
|
#
460168d5 |
|
19-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Use menu field label and refactor Use CreateLabelLayoutItem() instead of faking the label with a BStringView. This is important because it means the label is part of the menu field control rather than being it's own separate view. Also convert from using deprecated BGroupLayoutBuilder and BGridLayoutBuilder classes and use the BLayoutBuilder template instead. Use font-relative spacing values instead of constants. Make key label take up 2 columns Make protected methods private, don't want to subclass ModifierKeysWindow
|
#
2388b04a |
|
19-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Move ConflictView to top. Also, move includes from .h to .cpp file. Make _FillSavedIcon() private, make Draw() public.
|
#
3cee15aa |
|
28-Mar-2012 |
John Scipione <jscipione@gmail.com> |
Keymap changes from recent activity. No AltGr yet. Below is a mostly complete summary of the changes in this commit. * Set the DeadKeys for the US-International Keymap to use the Option map. * Rename American keymap to US * Update the US, US-International, and United-Kingdom keymaps to take out unneeded spaces in the option layer. Also updated the dead keys and some other keys on the US-International keyboard to use UTF-8 characters rather than there ASCII equivalents when different. * Make the Option key fall-through when there is no mapping in the Option table. Option is for special characters, if none, print the regular one. This is mostly meant for the US keymap which has an empty option map. But also so that you don't have to repeat the normal, shift, and caps maps in the option map needlessly. Although the keymaps are still not empty in some cases that it could be like numpad keys and space. * Update the /bin/keymap app to use fputs() instead of printf() when there is no actual formatting taking place. I've gotten into trouble for doing this before and it is faster to not process the string unnecessarily. * Also several 80-char limit style fixes and updated comments. * In Keymap class Reorder the modifier keys to match the keymap files. Put B_CONTROL_KEY check above B_OPTION_KEY. Neither change has any effect, they are purely aesthetic. * Update DumpKeymap() method to use the abbreviated modifier letters so it will fit in your 80-char wide terminal. * Tiny style fix in InputServer * 80-char limit style fix in BWindow and add a comment that the shortcut gets eaten in the case of Cmd+Q * Implement IndexForModifier() in KeyboardLayout, although I am not using it. * Take Caps Lock out of the Modifier keys window because I couldn't get it to work the way I wanted it to. * Move key roles to the left column, and the key label on the left. Add column header labels. Thanks Rimas! * Add validation and improve marking menu options. Add a 'Disabled' option to control, option, and command menus to disable the key. Make the key role text grey if the key roles is disabled. Validation ensures that you cannot repeat the same key twice in the Modifier keys window since that won't work. You can't define 2 sets of option keys even if you really want to. You can disable your control, option, and command keys if you want, but that is not recommended. * Rename kUpdateModifiers to kUpdateModifierKeys message to differetiate it from kUpdateModifier. * Add shift key to Modifier keys window, use the stop icon instead of the warning icon to indicate conflicts. * Allow the Layout system to control the size of the Modifier keys window again, set the width's of the key role lables to the widest, set the width of the menu fields to take up the rest of the space minus room for the conflict views. I didn't like it that the Modifier keys window would change size based on what options you had selected in the menu fields. Now it doesn't, but, the layout system still makes it all fit.
|
#
1a6b60e6 |
|
25-Mar-2012 |
John Scipione <jscipione@gmail.com> |
Addresses some of the issues brought up in ticket #8148 The key labels have been changed to Win/Option and Alt/Command to better associate them with the key names on a PC keyboard. This is not perfect, but, better. Added a checkbox entitled "Switch right Alt/Command and Win/Option keys" This checkbox does what it says, switches the keys on the right side of your keyboard leaving the left side according to how you set them. This is needed for some international keymaps. Whether or not you have switched already is not remembered, you have to check the box each time you open the dialog. I don't know how to figure out whether or not the keys have been switched already reliably. Hopefully this isn't a big deal. Set the menu option and window title to sentence case, thanks Humdinger.
|
#
bce949f5 |
|
07-Nov-2011 |
John Scipione <jscipione@gmail.com> |
Implemented the style changes and other improvements suggested by Axel to the Keymap preference app Modifier Keys window. The number of lines of code in the class was significantly reduced by these changes. I also made one small change to change the window title from 'Modifers Keys' to 'Modifier Keys'. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43221 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f5ac2da0 |
|
07-Nov-2011 |
John Scipione <jscipione@gmail.com> |
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
|
#
73ee1578a9600915e5d48a3bbff2cd6321421388 |
|
20-Feb-2014 |
John Scipione <jscipione@gmail.com> |
Keymap: Hide/show warning/stop icon views
|
#
2943ba13544fea7521c02239c4fc4f30621e4077 |
|
21-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Add warning icon. That shows when the left and right side key roles don't match. e.g. The left control key has a different key role than the right control key. The warning doesn't actually stop you from setting the modifier keys though. Add tooltips on the warning and stop icons explaining the problem. Also a couple minor style fixes.
|
#
b87ee2bfebe58eb6c6cddc5979a524b1511ed271 |
|
19-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Conflict if either left or right ... key doesn't match rather than requiring both left and right keys to not match for a conflict. Also update copyright year
|
#
460168d586c1aca66d13d79736370a649db7cd0e |
|
19-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Use menu field label and refactor Use CreateLabelLayoutItem() instead of faking the label with a BStringView. This is important because it means the label is part of the menu field control rather than being it's own separate view. Also convert from using deprecated BGroupLayoutBuilder and BGridLayoutBuilder classes and use the BLayoutBuilder template instead. Use font-relative spacing values instead of constants. Make key label take up 2 columns Make protected methods private, don't want to subclass ModifierKeysWindow
|
#
2388b04ab89c5cb78f6038c235b9659b90149b04 |
|
19-Aug-2013 |
John Scipione <jscipione@gmail.com> |
Keymap mod keys: Move ConflictView to top. Also, move includes from .h to .cpp file. Make _FillSavedIcon() private, make Draw() public.
|
#
3cee15aac2ef8c6ae8975d9add34c36aa4224c29 |
|
28-Mar-2012 |
John Scipione <jscipione@gmail.com> |
Keymap changes from recent activity. No AltGr yet. Below is a mostly complete summary of the changes in this commit. * Set the DeadKeys for the US-International Keymap to use the Option map. * Rename American keymap to US * Update the US, US-International, and United-Kingdom keymaps to take out unneeded spaces in the option layer. Also updated the dead keys and some other keys on the US-International keyboard to use UTF-8 characters rather than there ASCII equivalents when different. * Make the Option key fall-through when there is no mapping in the Option table. Option is for special characters, if none, print the regular one. This is mostly meant for the US keymap which has an empty option map. But also so that you don't have to repeat the normal, shift, and caps maps in the option map needlessly. Although the keymaps are still not empty in some cases that it could be like numpad keys and space. * Update the /bin/keymap app to use fputs() instead of printf() when there is no actual formatting taking place. I've gotten into trouble for doing this before and it is faster to not process the string unnecessarily. * Also several 80-char limit style fixes and updated comments. * In Keymap class Reorder the modifier keys to match the keymap files. Put B_CONTROL_KEY check above B_OPTION_KEY. Neither change has any effect, they are purely aesthetic. * Update DumpKeymap() method to use the abbreviated modifier letters so it will fit in your 80-char wide terminal. * Tiny style fix in InputServer * 80-char limit style fix in BWindow and add a comment that the shortcut gets eaten in the case of Cmd+Q * Implement IndexForModifier() in KeyboardLayout, although I am not using it. * Take Caps Lock out of the Modifier keys window because I couldn't get it to work the way I wanted it to. * Move key roles to the left column, and the key label on the left. Add column header labels. Thanks Rimas! * Add validation and improve marking menu options. Add a 'Disabled' option to control, option, and command menus to disable the key. Make the key role text grey if the key roles is disabled. Validation ensures that you cannot repeat the same key twice in the Modifier keys window since that won't work. You can't define 2 sets of option keys even if you really want to. You can disable your control, option, and command keys if you want, but that is not recommended. * Rename kUpdateModifiers to kUpdateModifierKeys message to differetiate it from kUpdateModifier. * Add shift key to Modifier keys window, use the stop icon instead of the warning icon to indicate conflicts. * Allow the Layout system to control the size of the Modifier keys window again, set the width's of the key role lables to the widest, set the width of the menu fields to take up the rest of the space minus room for the conflict views. I didn't like it that the Modifier keys window would change size based on what options you had selected in the menu fields. Now it doesn't, but, the layout system still makes it all fit.
|
#
1a6b60e613fde4ec77dd3bb247987e3430703c6f |
|
25-Mar-2012 |
John Scipione <jscipione@gmail.com> |
Addresses some of the issues brought up in ticket #8148 The key labels have been changed to Win/Option and Alt/Command to better associate them with the key names on a PC keyboard. This is not perfect, but, better. Added a checkbox entitled "Switch right Alt/Command and Win/Option keys" This checkbox does what it says, switches the keys on the right side of your keyboard leaving the left side according to how you set them. This is needed for some international keymaps. Whether or not you have switched already is not remembered, you have to check the box each time you open the dialog. I don't know how to figure out whether or not the keys have been switched already reliably. Hopefully this isn't a big deal. Set the menu option and window title to sentence case, thanks Humdinger.
|
#
bce949f5318afe7645b643274f9d48c5ed8fa1cc |
|
07-Nov-2011 |
John Scipione <jscipione@gmail.com> |
Implemented the style changes and other improvements suggested by Axel to the Keymap preference app Modifier Keys window. The number of lines of code in the class was significantly reduced by these changes. I also made one small change to change the window title from 'Modifers Keys' to 'Modifier Keys'. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43221 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f5ac2da0a80a5c1075cfb06747c58a5f95ea124a |
|
07-Nov-2011 |
John Scipione <jscipione@gmail.com> |
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
|