shrub/pkg/arvo/mar/dill/belt.hoon

66 lines
1.7 KiB
Plaintext
Raw Normal View History

2015-04-08 02:07:10 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/belt/dill/mar
2015-04-08 02:07:10 +03:00
::
2016-02-18 02:00:12 +03:00
/? 310
2015-12-10 12:17:19 +03:00
/- kyev, sole
2016-11-17 04:42:58 +03:00
::
2015-04-08 02:07:10 +03:00
::::
::
2016-11-17 04:37:39 +03:00
=, sole
|_ dill-belt:dill
2015-04-08 02:07:10 +03:00
::
++ grad %noun
++ grow
|%
++ noun +<.grow
--
2015-04-08 02:07:10 +03:00
++ grab :: convert from
|%
++ json
=< (cork . kyev)
2015-12-20 23:50:45 +03:00
|= jon/^json ^- ^kyev
!!
:: %- need
:: %. jon => jo %- ot
:: :~ mod+(cu silt (ar (su (perk ~[%ctrl %shift %alt %meta]))))
:: :- %key
:: %+ cu |*(a/$%({$str @t} {$act @}) ?+(-.a a $str +.a))
:: =- (of [str+so act+(su (perk -)) ~])
:: :~ %ctrl %shift %alt %meta %entr %esc %caps %uncap
:: %pgup %pgdn %home %end %baxp %del %ins
:: %up %down %left %right
:: == ==
2015-04-08 02:07:10 +03:00
++ kyev
|= kev/^kyev ^- dill-belt:dill
2015-12-21 00:16:39 +03:00
~| dill-belt-incomplete+kev
2015-12-10 12:17:19 +03:00
?: ?=({$act ?($ctrl $shift $alt $meta)} q.kev)
2015-04-08 02:07:10 +03:00
[%txt ~] :: ignore
=+ mod=(~(del in p.kev) %shift)
?^ mod
?^ q.kev !! :: only accept strings
2015-04-09 04:35:17 +03:00
=. q.kev
?. (~(has in p.kev) %ctrl)
q.kev
(con 96 q.kev) :: ctrl key decoding
2015-04-08 02:07:10 +03:00
=+ cha=(tuba (trip q.kev))
2018-03-19 07:18:20 +03:00
?> ?=({@ ~} cha) :: of a single character
2015-04-08 02:07:10 +03:00
?+ mod !! :: modified by one buckykey
2018-03-19 07:18:20 +03:00
{$ctrl ~ ~} [%ctl i.cha]
{$alt ~ ~} [%met i.cha]
2015-04-08 02:07:10 +03:00
==
?@ q.kev
[%txt (tuba (trip q.kev))]
?+ +.q.kev !!
$del [%del ~]
$baxp [%bac ~]
$entr [%ret ~]
$up [%aro %u]
$down [%aro %d]
$left [%aro %l]
$right [%aro %r]
2015-04-08 02:07:10 +03:00
== :: %yow, %rez?
::
++ noun dill-belt:dill :: clam from %noun
2015-04-08 02:07:10 +03:00
--
--