Compare commits

..

No commits in common. "5192368ba877b0e9fc7fbc5a1e3795fe97b20fcf" and "b186685e2f83b1f7fa5877d559b581e66b194449" have entirely different histories.

5 changed files with 2 additions and 88 deletions

View File

@ -5,12 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# [0.11.0] - 2025-05-22
### Added
- hotkey commands, see [Hotkey](https://github.com/onyx-and-iris/obsws-cli?tab=readme-ov-file#hotkey)
# [0.10.0] - 2025-04-27 # [0.10.0] - 2025-04-27
### Added ### Added

View File

@ -452,40 +452,6 @@ obsws-cli virtualcam toggle
obsws-cli virtualcam status obsws-cli virtualcam status
``` ```
#### Hotkey
- list: List all hotkeys.
```console
obsws-cli hotkey list
```
- trigger: Trigger a hotkey by name.
```console
obsws-cli hotkey trigger OBSBasic.StartStreaming
obsws-cli hotkey trigger OBSBasic.StopStreaming
```
- trigger-sequence: Trigger a hotkey by sequence.
- flags:
*optional*
- --shift: Press shift.
- --ctrl: Press control.
- --alt: Press alt.
- --cmd: Press command (mac).
- args: <key_id>
- Check [obs-hotkeys.h][obs-keyids] for a full list of OBS key ids.
```console
obsws-cli hotkey trigger-sequence OBS_KEY_F1 --ctrl
obsws-cli hotkey trigger-sequence OBS_KEY_F1 --shift --ctrl
```
## License ## License
@ -493,4 +459,3 @@ obsws-cli hotkey trigger-sequence OBS_KEY_F1 --shift --ctrl
[obs-studio]: https://obsproject.com/ [obs-studio]: https://obsproject.com/
[obs-keyids]: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-hotkeys.h

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online> # SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
__version__ = "0.11.0" __version__ = "0.10.5"

View File

@ -7,7 +7,6 @@ import typer
from . import ( from . import (
group, group,
hotkey,
input, input,
profile, profile,
record, record,
@ -25,7 +24,6 @@ from .alias import AliasGroup
app = typer.Typer(cls=AliasGroup) app = typer.Typer(cls=AliasGroup)
for module in ( for module in (
group, group,
hotkey,
input, input,
profile, profile,
record, record,

View File

@ -1,43 +0,0 @@
"""module containing commands for hotkey management."""
import typer
from .alias import AliasGroup
app = typer.Typer(cls=AliasGroup)
@app.callback()
def main():
"""Control hotkeys in OBS."""
@app.command('list | ls')
def list(
ctx: typer.Context,
):
"""List all hotkeys."""
resp = ctx.obj.get_hotkey_list()
typer.echo('\n'.join(resp.hotkeys))
@app.command('trigger | tr')
def trigger(
ctx: typer.Context,
hotkey: str = typer.Argument(..., help='The hotkey to trigger'),
):
"""Trigger a hotkey by name."""
ctx.obj.trigger_hotkey_by_name(hotkey)
@app.command('trigger-sequence | trs')
def trigger_sequence(
ctx: typer.Context,
shift: bool = typer.Option(False, help='Press shift when triggering the hotkey'),
ctrl: bool = typer.Option(False, help='Press control when triggering the hotkey'),
alt: bool = typer.Option(False, help='Press alt when triggering the hotkey'),
cmd: bool = typer.Option(False, help='Press cmd when triggering the hotkey'),
key_id: str = typer.Argument(..., help='The hotkey to trigger'),
):
"""Trigger a hotkey by sequence."""
ctx.obj.trigger_hotkey_by_key_sequence(key_id, shift, ctrl, alt, cmd)