-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vendor_id and product_id into virtual_hid_keyboard_parameters (#32)
- Loading branch information
Showing
13 changed files
with
128 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
include/pqrs/karabiner/driverkit/virtual_hid_device_service/parameters.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#pragma once | ||
|
||
// (C) Copyright Takayama Fumihiko 2024. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <pqrs/hid.hpp> | ||
#include <string_view> | ||
|
||
namespace pqrs { | ||
namespace karabiner { | ||
namespace driverkit { | ||
namespace virtual_hid_device_service { | ||
class virtual_hid_keyboard_parameters final { | ||
public: | ||
virtual_hid_keyboard_parameters(void) | ||
: virtual_hid_keyboard_parameters(pqrs::hid::vendor_id::value_t(0x16c0), | ||
pqrs::hid::product_id::value_t(0x27db), | ||
pqrs::hid::country_code::not_supported) { | ||
} | ||
|
||
virtual_hid_keyboard_parameters(pqrs::hid::vendor_id::value_t vendor_id, | ||
pqrs::hid::product_id::value_t product_id, | ||
pqrs::hid::country_code::value_t country_code) | ||
: vendor_id_(vendor_id), | ||
product_id_(product_id), | ||
country_code_(country_code) { | ||
} | ||
|
||
pqrs::hid::vendor_id::value_t get_vendor_id(void) const { | ||
return vendor_id_; | ||
} | ||
|
||
void set_vendor_id(pqrs::hid::vendor_id::value_t value) { | ||
vendor_id_ = value; | ||
} | ||
|
||
pqrs::hid::product_id::value_t get_product_id(void) const { | ||
return product_id_; | ||
} | ||
|
||
void set_product_id(pqrs::hid::product_id::value_t value) { | ||
product_id_ = value; | ||
} | ||
|
||
pqrs::hid::country_code::value_t get_country_code(void) const { | ||
return country_code_; | ||
} | ||
|
||
void set_country_code(pqrs::hid::country_code::value_t value) { | ||
country_code_ = value; | ||
} | ||
|
||
bool operator==(const virtual_hid_keyboard_parameters&) const = default; | ||
|
||
private: | ||
pqrs::hid::vendor_id::value_t vendor_id_; | ||
pqrs::hid::product_id::value_t product_id_; | ||
pqrs::hid::country_code::value_t country_code_; | ||
}; | ||
} // namespace virtual_hid_device_service | ||
} // namespace driverkit | ||
} // namespace karabiner | ||
} // namespace pqrs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"package_version": "4.3.0", | ||
"driver_version": "1.7.0", | ||
"client_protocol_version": 4 | ||
"package_version": "4.3.1", | ||
"driver_version": "1.8.0", | ||
"client_protocol_version": 5 | ||
} |