File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -634,7 +634,7 @@ pub async fn handle_key_events(
634634 FocusedBlock :: AccessPointInput => match key_event. code {
635635 KeyCode :: Enter => {
636636 ap. start ( sender. clone ( ) ) . await ?;
637- app. focused_block = FocusedBlock :: Device ;
637+ app. focused_block = FocusedBlock :: AccessPoint ;
638638 }
639639
640640 KeyCode :: Esc => {
@@ -709,6 +709,20 @@ pub async fn handle_key_events(
709709 _ => { }
710710 } ,
711711
712+ KeyCode :: Char ( c) if c == config. ap . start => {
713+ if app. focused_block == FocusedBlock :: AccessPoint {
714+ ap. ap_start
715+ . store ( true , std:: sync:: atomic:: Ordering :: Relaxed ) ;
716+ app. focused_block = FocusedBlock :: AccessPointInput ;
717+ }
718+ }
719+
720+ KeyCode :: Char ( c) if c == config. ap . stop => {
721+ if app. focused_block == FocusedBlock :: AccessPoint {
722+ ap. stop ( sender. clone ( ) ) . await ?;
723+ }
724+ }
725+
712726 _ => {
713727 if app. focused_block == FocusedBlock :: Device {
714728 match key_event. code {
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ pub fn render(app: &mut App, frame: &mut Frame) {
2323 Mode :: Ap => {
2424 if let Some ( ap) = & mut app. device . ap {
2525 ap. render ( frame, app. focused_block , & device, app. config . clone ( ) ) ;
26+ if app. focused_block == FocusedBlock :: AccessPointInput {
27+ ap. render_input ( frame) ;
28+ }
2629 }
2730 }
2831 }
You can’t perform that action at this time.
0 commit comments