Coder Social home page Coder Social logo

copy-paste-in-xv6's Introduction

copy-paste-in-xv6

The purpose of this project was to edit the xv6 system so it could support copy and paste functions in a terminal. There needed to be a clear distinction when a user has entered copy mode; selection and copying of the selected text needed to be enabled, as well as pasting the previously selected text. Special attention was given to ensure the current system functions and work was not affected, resulting in the system crashing down.

Copy mode is entered when a user presses the key combination shift + alt + c. Once in copy mode, the user can move the cursor up and down, left or right using the w, s, a or d keys, respectively. To mark the beginning of the selection of text, the user presses the q key. In case we have already begun the selection, the q key does nothing. To mark the ending of the selection, the e key is used. The e key also does nothing if we have already begun the selection. The user exits the selection mode using the shift + alt + c key combination.

Selection begins with the pressed q key, only when in copy mode. Attention was paid so that if the user moves forward from the starting position (this includes going right or down), character in the starting position has to be included in the selection; however, if the user moves backwards (left or up), character in the starting position is not included in the selection. Upon exiting the copy mode, the cursor resets to the position it was at before entering copy mode.

Paste functionality needs to be enabled only when the user isn’t in copy mode, and only in case the user has previously used copy mode. Using the key combination shift + alt + p, the user pastes the selected text at the current position.

copy-paste-in-xv6's People

Contributors

minnakovachevich avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.