mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
qt5: enable capslock/numlock in test run scripts
This commit is contained in:
parent
f8f9f710e5
commit
00daecf838
@ -16,6 +16,8 @@ import_from_depot [depot_user]/src/[base_src] \
|
||||
[depot_user]/src/libpng \
|
||||
[depot_user]/src/mesa \
|
||||
[depot_user]/src/nitpicker \
|
||||
[depot_user]/src/global_keys_handler \
|
||||
[depot_user]/src/rom_filter \
|
||||
[depot_user]/src/pcre16 \
|
||||
[depot_user]/src/qt5_core \
|
||||
[depot_user]/src/qt5_gui \
|
||||
@ -115,6 +117,9 @@ proc qt5_start_nodes { feature_arg } {
|
||||
|
||||
<policy label_prefix="pointer" domain="pointer"/>
|
||||
<default-policy domain="default"/>
|
||||
|
||||
<global-key name="KEY_CAPSLOCK" label="global_keys_handler -> input" />
|
||||
<global-key name="KEY_NUMLOCK" label="global_keys_handler -> input" />
|
||||
</config>
|
||||
</start>
|
||||
|
||||
@ -150,9 +155,35 @@ proc qt5_start_nodes { feature_arg } {
|
||||
<policy label="clipboard -> focus" report="nitpicker -> focus"/>
|
||||
<policy label="pointer -> hover" report="nitpicker -> hover"/>
|
||||
<policy label="pointer -> xray" report="nitpicker -> xray"/>
|
||||
<policy label="input_filter -> capslock" report="global_keys_handler -> capslock"/>
|
||||
<policy label="numlock_remap_rom -> numlock" report="global_keys_handler -> numlock"/>
|
||||
<policy label="ps2_drv -> capslock" report="global_keys_handler -> capslock"/>
|
||||
<policy label="ps2_drv -> numlock" report="global_keys_handler -> numlock"/>
|
||||
<policy label="usb_drv -> capslock" report="global_keys_handler -> capslock"/>
|
||||
<policy label="usb_drv -> numlock" report="global_keys_handler -> numlock"/>
|
||||
</config>
|
||||
</start>
|
||||
|
||||
<start name="global_keys_handler">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<config>
|
||||
<bool name="capslock" initial="no"/>
|
||||
<bool name="numlock" initial="no"/>
|
||||
|
||||
<press name="KEY_CAPSLOCK" bool="capslock" change="toggle"/>
|
||||
<press name="KEY_NUMLOCK" bool="numlock" change="toggle"/>
|
||||
|
||||
<report name="capslock"> <bool name="capslock"/> </report>
|
||||
<report name="numlock"> <bool name="numlock"/> </report>
|
||||
</config>
|
||||
<route>
|
||||
<service name="Report"> <child name="wm_report_rom"/> </service>
|
||||
<service name="Nitpicker"> <child name="nitpicker"/> </service>
|
||||
<service name="Timer"> <child name="timer"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="wm" caps="250">
|
||||
<resource name="RAM" quantum="8M"/>
|
||||
<provides>
|
||||
|
@ -209,6 +209,43 @@ proc drivers_start_nodes { feature_arg } {
|
||||
exec cp -f [genode_dir]/repos/os/src/server/input_filter/[language_chargen].chargen bin/
|
||||
exec cp -f [genode_dir]/repos/os/src/server/input_filter/special.chargen bin/
|
||||
|
||||
append start_nodes {
|
||||
<!-- toggle key mappings depending on the numlock state -->
|
||||
<start name="numlock_remap_rom">
|
||||
<binary name="rom_filter"/>
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="ROM"/> </provides>
|
||||
<config>
|
||||
<input name="numlock_enabled" rom="numlock" node="numlock">
|
||||
<attribute name="enabled"/> </input>
|
||||
<output node="remap">
|
||||
<if>
|
||||
<has_value input="numlock_enabled" value="no"/>
|
||||
<then>
|
||||
<inline>
|
||||
<key name="KEY_KP0" to="KEY_INSERT"/>
|
||||
<key name="KEY_KP1" to="KEY_END"/>
|
||||
<key name="KEY_KP2" to="KEY_DOWN"/>
|
||||
<key name="KEY_KP3" to="KEY_PAGEDOWN"/>
|
||||
<key name="KEY_KP4" to="KEY_LEFT"/>
|
||||
<key name="KEY_KP6" to="KEY_RIGHT"/>
|
||||
<key name="KEY_KP7" to="KEY_HOME"/>
|
||||
<key name="KEY_KP8" to="KEY_UP"/>
|
||||
<key name="KEY_KP9" to="KEY_PAGEUP"/>
|
||||
<key name="KEY_KPDOT" to="KEY_DELETE"/>
|
||||
</inline>
|
||||
</then>
|
||||
</if>
|
||||
</output>
|
||||
</config>
|
||||
<route>
|
||||
<service name="ROM" label="numlock"> <child name="wm_report_rom"/> </service>
|
||||
<any-service> <parent/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
}
|
||||
|
||||
|
||||
append start_nodes {
|
||||
<start name="input_filter">
|
||||
<resource name="RAM" quantum="1M" />
|
||||
@ -223,6 +260,8 @@ proc drivers_start_nodes { feature_arg } {
|
||||
append start_nodes {
|
||||
<output>
|
||||
<chargen>
|
||||
<remap>
|
||||
<include rom="numlock.remap"/>
|
||||
<merge>}
|
||||
append_if [use_ps2_drv feature] start_nodes {
|
||||
<input name="ps2"/>}
|
||||
@ -232,8 +271,10 @@ proc drivers_start_nodes { feature_arg } {
|
||||
<input name="sdl"/>}
|
||||
append start_nodes {
|
||||
</merge>
|
||||
</remap>
|
||||
<mod1>
|
||||
<key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/>
|
||||
<rom name="capslock"/>
|
||||
</mod1>
|
||||
<mod2>
|
||||
<key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/>
|
||||
@ -252,6 +293,8 @@ proc drivers_start_nodes { feature_arg } {
|
||||
<route>
|
||||
<service name="LOG"> <parent/> </service>
|
||||
<service name="CPU"> <parent/> </service>
|
||||
<service name="ROM" label="capslock"> <child name="wm_report_rom"/> </service>
|
||||
<service name="ROM" label="numlock.remap"> <child name="numlock_remap_rom"/> </service>
|
||||
<service name="ROM"> <parent/> </service>
|
||||
<service name="PD"> <parent/> </service>
|
||||
<service name="Timer"> <child name="timer"/> </service>}
|
||||
@ -285,6 +328,12 @@ proc drivers_start_nodes { feature_arg } {
|
||||
<start name="ps2_drv">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
<config capslock_led="rom" numlock_led="rom"/>
|
||||
<route>
|
||||
<service name="ROM" label="capslock"> <child name="wm_report_rom"/> </service>
|
||||
<service name="ROM" label="numlock"> <child name="wm_report_rom"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
}
|
||||
|
||||
@ -307,13 +356,19 @@ proc drivers_start_nodes { feature_arg } {
|
||||
<service name="Nic"/>}
|
||||
append start_nodes {
|
||||
</provides>
|
||||
<config uhci="yes" ehci="yes" xhci="yes">}
|
||||
<config uhci="yes" ehci="yes" xhci="yes"
|
||||
capslock_led="rom" numlock_led="rom">}
|
||||
append_if [use_usb_input feature] start_nodes {
|
||||
<hid/>}
|
||||
append_if [use_usb_nic feature] start_nodes {
|
||||
<nic mac="2e:60:90:0c:4e:01" />}
|
||||
append start_nodes {
|
||||
</config>
|
||||
<route>
|
||||
<service name="ROM" label="capslock"> <child name="wm_report_rom"/> </service>
|
||||
<service name="ROM" label="numlock"> <child name="wm_report_rom"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user