New component for keyboards and panels.
20 Jul 2021 13:46 #215415
by nkp
Replied by nkp on topic New component for keyboards and panels.
Attachments:
Please Log in or Create an account to join the conversation.
29 Jul 2021 21:12 #216272
by andypugh
Replied by andypugh on topic New component for keyboards and panels.
Sorry for the late reply, I have been rather busy.
Are you using individual pins or scancodes?
If pins, then possibly you could use a (lot of) mux2 components in HAL.
If scancodes, then maybe toggle a HAL component that simply adds on an offset to the scancode.
Are you using individual pins or scancodes?
If pins, then possibly you could use a (lot of) mux2 components in HAL.
If scancodes, then maybe toggle a HAL component that simply adds on an offset to the scancode.
Please Log in or Create an account to join the conversation.
30 Jul 2021 04:09 #216297
by nkp
Replied by nkp on topic New component for keyboards and panels.
I'm using pins. It seems to me easier to make changes in the component than to use >40 mux2 . I'll try both.
Please Log in or Create an account to join the conversation.
30 Jul 2021 08:01 #216325
by andypugh
Replied by andypugh on topic New component for keyboards and panels.
I am surprised that the keyboard wasn't matrix-wired?
Please Log in or Create an account to join the conversation.
30 Jul 2021 09:32 - 30 Jul 2021 09:40 #216327
by nkp
Replied by nkp on topic New component for keyboards and panels.
the simplest way :
loadusr -W sendkeys config=t22
setp sendkeys.0.pin-event-00 2 # Key 1
setp sendkeys.0.pin-event-01 8 # Key 7
setp sendkeys.0.pin-event-11 3 # Key 2
setp sendkeys.0.pin-event-12 4 # Key 3
param->num_tgpin = param->num_events * 0.5;
for (j = 0; j < param->num_triggers; j++){
if (param->prev[j] != *hal->trigger[j]){
if (*hal->trigger[j]){ // keydown
if (*hal->toggle){ // toggle on
emit(param->fd, EV_KEY, hal->event[j + param->num_tgpin], 1);
emit(param->fd, EV_SYN, SYN_REPORT, 0);
} else { // toggle off
emit(param->fd, EV_KEY, hal->event[j], 1);
emit(param->fd, EV_SYN, SYN_REPORT, 0); }
} else { // keyup
if (*hal->toggle){ // toggle on
emit(param->fd, EV_KEY, hal->event[j + param->num_tgpin], 0);
emit(param->fd, EV_SYN, SYN_REPORT, 0);
} else { // toggle off
emit(param->fd, EV_KEY, hal->event[j], 0);
emit(param->fd, EV_SYN, SYN_REPORT, 0);
}
}
param->prev[j] = *hal->trigger[j];
Last edit: 30 Jul 2021 09:40 by nkp.
Please Log in or Create an account to join the conversation.
30 Jul 2021 09:49 - 30 Jul 2021 09:50 #216329
by nkp
Replied by nkp on topic New component for keyboards and panels.
to use the first half of the pins for some values, and the second half of the pins for other values
Last edit: 30 Jul 2021 09:50 by nkp.
Please Log in or Create an account to join the conversation.
30 Jul 2021 11:59 #216342
by andypugh
Replied by andypugh on topic New component for keyboards and panels.
It is probably possible to do it with two sendkeys components, wiring the pins to both and enabling one or the other.
Please Log in or Create an account to join the conversation.
30 Jul 2021 12:09 - 30 Jul 2021 12:10 #216343
by andypugh
Replied by andypugh on topic New component for keyboards and panels.
I think that a better way would be to add a new code to the config string, (maybe a for alternate) "a2" would create two "shift bits" as pins, and then the scancode params would be:
setp sendkeys.0.pin-event-01
setp sendkeys.0.pin-event-01-1
setp sendkeys.0.pin-event-01-2
setp sendkeys.0.pin-event-01-3
(for no shift, shift 1, shift 2 and both shifts)
I would also add a scancode (negative?) to set the shift bits from the keyboard. (and bidirectional bits in HAL to show or set status)
setp sendkeys.0.pin-event-01
setp sendkeys.0.pin-event-01-1
setp sendkeys.0.pin-event-01-2
setp sendkeys.0.pin-event-01-3
(for no shift, shift 1, shift 2 and both shifts)
I would also add a scancode (negative?) to set the shift bits from the keyboard. (and bidirectional bits in HAL to show or set status)
Last edit: 30 Jul 2021 12:10 by andypugh.
Please Log in or Create an account to join the conversation.
24 Sep 2021 04:29 - 24 Sep 2021 09:05 #221483
by nkp
Replied by nkp on topic New component for keyboards and panels.
Attachments:
Last edit: 24 Sep 2021 09:05 by nkp.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
27 Sep 2021 05:16 - 27 Sep 2021 05:18 #221685
by nkp
Replied by nkp on topic New component for keyboards and panels.
I am trying to use sendkeys with matrix_kb component. (No board 7i73)
Are there any restrictions on the number of rows in the component matrix_kb?
For example is a 9x7s configuration possible ?
Are there any restrictions on the number of rows in the component matrix_kb?
For example is a 9x7s configuration possible ?
Last edit: 27 Sep 2021 05:18 by nkp.
Please Log in or Create an account to join the conversation.
Time to create page: 0.167 seconds