Commit Graph

26 Commits

Author SHA1 Message Date
Aire-One 4188d1df1e doc: Move inline usage to example files 2021-06-20 20:50:02 +02:00
Aire-One a3609146aa doc(awful.key) Improve module description 2021-06-20 20:50:02 +02:00
Aire-One 8085a508d1 add(awful.key) keygroup enum style table
Replace the `awful.keygroup` property by an table that can be used
as an enum to point to the `awful.keygroups` definitions.

The previous field for `awful.keygroup` was empty (even no-existant),
and was here only to appear in the documentation as a definition for
the valid values to target keygroups.

With this new enum style table, the user can easily refere to keygroups
the same way we did for mouse buttons.
2021-06-12 16:39:24 +02:00
Aire-One 948506cde1 doc(awful.key) Declarative constructor parameters 2021-06-12 14:38:18 +02:00
ArenaL5 15929b0797 Add F-keys and numpad to `awful.key.keygroups`
Signed-off-by: ArenaL5 <arenal5@gmx.com>

Extend `fkeys` to F35

Signed-off-by: ArenaL5 <arenal5@gmx.com>

Reducing `numpad` to its most aggreable subset

Signed-off-by: ArenaL5 <arenal5@gmx.com>

Add method to select a layout directly

using the Super key + the numeric keypad. This method uses the layout list from the currently selected tag in the currently focused screen. (If there is no selected tag, it does nothing.)

To allow this, the keygroups `numpad` and `fkeys` were added to `awful.key.keygroups`.

Refit to avoid error by nil and to remove imperative code, as per recommendation from @Elv13.

Signed-off-by: ArenaL5 <arenal5@gmx.com>
2020-05-12 20:20:19 +02:00
ArenaL5 74f3e40c93 Document the newly exposed `awful.key.keygroups`
Also, more detail in the descriptions of properties `description` and `keygroup`

Signed-off-by: ArenaL5 <arenal5@gmx.com>
2020-02-20 03:56:46 +01:00
ArenaL5 7517bf6fae Add ability to abbreviate merged entries in awful.hotkeys_popup
Signed-off-by: ArenaL5 <arenal5@gmx.com>
2020-02-20 02:51:51 +01:00
ArenaL5 0eaaa5e425 Fix the definition of keygroup arrows
Also add a short comment about the format of keygroups.

Signed-off-by: ArenaL5 <arenal5@gmx.com>
2020-02-19 01:57:44 +01:00
Emmanuel Lepage Vallee 1f604a73c9 awful.key: Support multiple keys per `awful.key` objects.
This allows to support the arrows, numpad or numrow using a single
object. This will simplify some code, including `rc.lua`.
2019-12-05 22:48:56 -05:00
Emmanuel Lepage Vallee fe603f7dc5 capi.key: Enable the miss handlers. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 02486b3479 awful.key: Add a has_root_binding property and :trigger() method 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 21ae9c1edb awful.key: Turn into an object. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 4501f0e768 Allow to add and remove keys and buttons.
Another step in moving these APIs toward the common object oriented and
declarative paradigms used by other APIs.

This commit introduces the `awful.keyboard` module. It currenly only
exists as a placeholder for the first few append/remove function, but
will grow in scope in another pull request to expose the currently
private modifier APIs and to provide keybindings collision detection
and replace some of `awful.hotkey_popup` business logic.

The `keygrabber` tests which uses root keybindings are disabled for
now to keep the commit size small. This is necessary since the shims
will need many iterations of changes before this work again with the
new syntax.
2019-11-09 16:42:06 -05:00
Emmanuel Lepage Vallee 4dbc83fa7d doc: Modify the template to allow merging sections.
It might not be the most pretty of change, but it works. With this
change, it is possible to have multiple "things" in the "same"
section having the "same" name.

This allows for C/C++ style functions with the same name but different
signatures. Lua doesn't handle this well, so it should usually be
avoided. However, constructors might be a valid exception. Most older
widget (and object) constructors have multiple random argument while
newer one use `args`. Deprecating the old ones for the sake of
standardization might be a bit too much for users upgrading from v3.5.

Given the only reason all of those deprecation would happen is because
"its pretty that way", then lets allow 2 constructors and avoid outrage.
2019-11-03 01:28:29 -05:00
Emmanuel Lepage Vallee 96c4d001f1 doc: Remove capi.button/capi.key from the official doc.
`awful.button` is always the one used and it's confusing.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee b4ece0f053 doc: Use an explicit tag for all static functions.
This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.

This commit also fixes a large number of issues found while
proof-reading everything.
2019-06-08 18:14:13 -04:00
Emmanuel Lepage Vallee 0d80b3f0e9 keygrabber: Do not try to guess the modifiers name
There is no an API to query the correct value

Fixes #2515
2019-01-21 03:14:26 -05:00
Emmanuel Lepage Vallee 3c79f1c8d5 awful.key: Add more fields to the description
There is currently no centralized way to manage active keybindings so
the description data case be used to fill part of that role until an
official API is added.
2018-07-29 10:45:40 -04:00
Kevin Zander c3461b535c gears: Move awful.util.table to gears.table (#1641)
* Move table functions out of awful.util into new gears.table

* travis: Use v9999 prefix for full requests

Make sure no newly deprecated functions are used

* Move all `awful.util.table.*` calls to `gears.table.*` calls
Move table test functions from awful/util_spec to new gears/table_spec
Change awful.util.subsets call to gears.math.subsets in awful/key.lua
2017-03-08 15:18:33 -05:00
actionless 79a60b3009 fix(awful: key): clone table with user data
closes #1401

fix(tests: awesomerc): use `awful.key.execute` instead of local helper function
2017-01-30 18:19:24 +01:00
Uli Schlachter 259c4f716f Remove @release @AWESOME_VERSION@ everywhere (#1157)
It does not provide much value. The version number is already known to
ldoc globally in the "description" variable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-09 22:36:20 +02:00
Emmanuel Lepage Vallee 31e2a19f65 key: Make the ignore_modifiers table public
The prompt need to re-use it and Mod2 could be useful to toggle
between 2 different Awesome modes.
2016-07-09 20:01:17 +02:00
Emmanuel Lepage Vallee 11f0620d7c awful.key: Add a function to execute keybindings 2016-04-11 23:46:10 -04:00
Uli Schlachter c455e1f90e Fix luacheck warnings in half of awful
Boy, awful is huge... Let's better do it in two parts

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
actionless 0e3009936c feat(lib: awful: key): save current hotkeys 2015-09-30 13:17:12 +02:00
Julian Wollrath 6cc7be512c Remove the *.in from all files.
Signed-off-b: Julian Wollrath <jwollrath@web.de>
2015-06-19 22:33:32 +02:00